[\\s\\S]*?","gi");(e=(t=e).replace(r,""))!==t;);return e.replace(/e.minDistanceForSwipe:"x"===e.validAxis&&(t=n>e.minDistanceForSwipe),{isHorizontal:r/g),o="var p = []; with(o) {\n",i=!1;r.forEach(function(e){i?"="==e[0]?o+=" p.push("+e.replace(/^=\s*|\s*$/g,"")+");\n":o+=" "+e+"\n":e&&(o+=" p.push('"+e.replace(/'/g,"\\'").split(/\r?\n/g).join("\\n');\n p.push('")+"');\n"),i=!i}),o+='} return p.join("");';try{n=new Function("o",o)}catch(e){r=new Error("Cannot parse template! (see `template` property)");throw r.template=o,r}}return t?n(t):n}function flash(){var e=document.createElement("div");e.style.background="white",e.style.opacity=.005,e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.width="100%",e.style.height="100%",e.style.zIndex=2147483647,document.body.appendChild(e),setTimeout(function(){e.parentNode.removeChild(e)},0)}function crc32(e){"use strict";for(var t=-1,n=0,r=[0,-227835133,-516198153,324072436,-946170081,904991772,648144872,-724933397,-1965467441,2024987596,1809983544,-1719030981,1296289744,-1087877933,-1401372889,1578318884,274646895,-499825556,-244992104,51262619,-675000208,632279923,922689671,-996891772,-1702387808,1760304291,2075979607,-1982370732,1562183871,-1351185476,-1138329528,1313733451,549293790,-757723683,-1048117719,871202090,-416867903,357341890,102525238,-193467851,-1436232175,1477399826,1264559846,-1187764763,1845379342,-1617575411,-1933233671,2125378298,820201905,-1031222606,-774358714,598981189,-143008082,85089709,373468761,-467063462,-1170599554,1213305469,1526817161,-1452612982,2107672161,-1882520222,-1667500394,1861252501,1098587580,-1290756417,-1606390453,1378610760,-2032039261,1955203488,1742404180,-1783531177,-878557837,969524848,714683780,-655182201,205050476,-28094097,-318528869,526918040,1361435347,-1555146288,-1340167644,1114974503,-1765847604,1691668175,2005155131,-2047885768,-604208612,697762079,986182379,-928222744,476452099,-301099520,-44210700,255256311,1640403810,-1817374623,-2130844779,1922457750,-1503918979,1412925310,1197962378,-1257441399,-350237779,427051182,170179418,-129025959,746937522,-554770511,-843174843,1070968646,1905808397,-2081171698,-1868356358,1657317369,-1241332974,1147748369,1463399397,-1521340186,-79622974,153784257,444234805,-401473738,1021025245,-827320098,-572462294,797665321,-2097792136,1889384571,1674398607,-1851340660,1164749927,-1224265884,-1537745776,1446797203,137323447,-96149324,-384560320,461344835,-810158936,1037989803,781091935,-588970148,-1834419177,1623424788,1939049696,-2114449437,1429367560,-1487280117,-1274471425,1180866812,410100952,-367384613,-112536529,186734380,-538233913,763408580,1053836080,-860110797,-1572096602,1344288421,1131464017,-1323612590,1708204729,-1749376582,-2065018290,1988219213,680717673,-621187478,-911630946,1002577565,-284657034,493091189,238226049,-61306494,-1307217207,1082061258,1395524158,-1589280451,1972364758,-2015074603,-1800104671,1725896226,952904198,-894981883,-638100751,731699698,-11092711,222117402,510512622,-335130899,-1014159676,837199303,582374963,-790768336,68661723,-159632680,-450051796,390545967,1230274059,-1153434360,-1469116676,1510247935,-1899042540,2091215383,1878366691,-1650582816,-741088853,565732008,854102364,-1065151905,340358836,-433916489,-177076669,119113024,1493875044,-1419691417,-1204696685,1247431312,-1634718085,1828433272,2141937292,-1916740209,-483350502,291187481,34330861,-262120466,615137029,-691946490,-980332558,939183345,1776939221,-1685949482,-1999470558,2058945313,-1368168502,1545135305,1330124605,-1121741762,-210866315,17165430,307568514,-532767615,888469610,-962626711,-707819363,665062302,2042050490,-1948470087,-1735637171,1793573966,-1104306011,1279665062,1595330642,-1384295599],n=0;n>>8^r[255&(t^e.charCodeAt(n))];return(-1^t)>>>0}function isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}function isDefAndNotNull(e){return null!=e}function updateQueryStringParameter(e,t,n){t=encodeURIComponent(t),n=encodeURIComponent(n);var r=new RegExp("([?|&])"+t+"=.*?(&|$)","i");return separator=-1!==e.indexOf("?")?"&":"?",e.match(r)?e.replace(r,"$1"+t+"="+n+"$2"):e+separator+t+"="+n}function fetchShortenedUrl(r,e,t){t=t||noop;var n,o=!1,i=fetchShortenedUrl.inProgress,a=fetchShortenedUrl.cache;function c(t,n){i[r].forEach(function(e){e[t](n)}),delete i[r]}"http"==!r.slice(0,4)?t():a[r]?defer(function(){e(a[r])},0,"fetchShortenedUrl defer success callback"):(i[r]||(i[r]=[],o=!0),i[r].push({success:e,error:t}),o&&(t=(creative.runtimeParams.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"shortenedUrls/",o={url:r,fields:"shortUrlKey"},n={cbName:"shortener_"+btoa(to_utf8(r)).replace(/\//g,"$").replace(/\+/g,"_").replace(/=/g,"")},loadJSONP(t+"?"+buildQuery(o),n,function(e){e=creative.shareUrl+e.shortUrlKey;c("success",a[r]=e)},function(){requestCreateShortenedUrl(r,c)})))}function requestCreateShortenedUrl(t,n){var e=(creative.runtimeParams.secure?creative.apiUrl:creative.insecureApiUrl)+"shortenedUrls/",r=fetchShortenedUrl.cache,o=new XMLHttpRequest;o.open("POST",e),o.setRequestHeader("Content-Type","application/json; charset=utf-8"),o.onreadystatechange=function(){var e;4===o.readyState&&(201===o.status?(e=JSON.parse(o.responseText),e=creative.shareUrl+e.shortUrlKey,r[t]=e,n("success",e)):n("error"))},o.send(JSON.stringify({url:t}))}function isMediaPlaying(e){try{return 0=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom:t instanceof CRect?t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom:void 0},CRect.prototype.map=function(t,i){var e=i.width/t.width,o=i.height/t.height;return new CRect((this.left-t.left)*e+i.left,(this.top-t.top)*o+i.top,this.width*e,this.height*o)},CRect.prototype.equals=function(t){return t&&this.left==t.left&&this.top==t.top&&this.right==t.right&&this.bottom==t.bottom},CRect.prototype.toString=function(){return"CRect: "+JSON.stringify(this)};;
function Logger(e){if(!(this instanceof Logger))return new Logger(e);e=e||"";var n=noop;(0<=Logger.enabledNames.indexOf(e)||0<=Logger.enabledNames.indexOf("all"))&&(n=function(){var e=[].slice.apply(arguments);e.unshift(Logger._ts()+" ["+Logger.sessionId+(this.name?" "+this.name:"")+"]"),console.log.apply(console,e)}),this.name=e,this.log=n,this.warn=n,this.debug=n,this.error=n}Logger._ts=function(){var e=new Date;function n(e,n){for(e+="";e.lengthn[t])return 1}return 0}return!(-1===s(e,r)||1===s(e,i))}t.prototype.android=function(){return"Android"===this.name&&h(this.version,arguments)},t.prototype.osx=function(){return"OSX"===this.name&&h(this.version,arguments)},t.prototype.ios=function(){return"IOS"===this.name&&h(this.version,arguments)},t.prototype.windows=function(){return"Windows"===this.name&&h(this.version,arguments)},t.prototype.windowsPhone=function(){return"WindowsPhone"===this.name&&h(this.version,arguments)},t.prototype.linux=function(){return"Linux"===this.name},r.prototype.safari=function(){return"Safari"===this.name&&h(this.version,arguments)},r.prototype.chrome=function(){return 0===this.name.indexOf("Chrom")&&h(this.version,arguments)},r.prototype.ie=function(){return 0===this.name.indexOf("Internet Explorer")&&h(this.version,arguments)},r.prototype.android=function(){return"Android Browser"===this.name&&h(this.version,arguments)},r.prototype.samsung=function(){return"Samsung Browser"===this.name&&h(this.version,arguments)},r.prototype.opera=function(){return 0===this.name.indexOf("Opera")&&h(this.version,arguments)},r.prototype.silk=function(){return"Amazon Silk"===this.name&&h(this.version,arguments)},r.prototype.firefox=function(){return 0===this.name.indexOf("Firefox")&&h(this.version,arguments)},r.prototype.edge=function(){return"Edge"===this.name&&h(this.version,arguments)},r.prototype.miui=function(){return"MIUI Browser"===this.name&&h(this.version,arguments)},r.prototype.webView=function(){var e,n,t=null;return"iP"===(o.navigator.platform||"").substr(0,2)?(e=-1!==(e=this.userAgent).indexOf("Safari")&&-1!==e.indexOf("Version"),n=!/constructor/i.test(o.HTMLElement),e&&!o.navigator.standalone?t="iOS Safari or Safari Controller":(n||o.indexedDB)&&o.statusbar.visible?(o.webkit&&o.webkit.messageHandlers||n||o.indexedDB)&&(t="WKWebView"):t="UIWebView"):/^.*\/\d\.\d \(.*wv\).*/.test(this.userAgent)&&(t="AndroidWebView"),t},r.prototype.facebookApp=function(){var e=this.userAgent;return-1t[n])return 1}return 0}return!(-1===a(e,i)||1===a(e,r))}}(window);;
!function(n){var e=n.navigator.userAgent,r=function(){var e=n;try{for(;void 0!==e.parent.location.href&&e.parent.document!==e.document;)e=e.parent}catch(e){}return e}(),t=/rv:.*Gecko\//.test(e),i=/MSIE|Trident\//.test(e),o=/WebKit/.test(e),a=/^-?([mM]oz|[wW]eb[kK]it|[mM]s)-?/,l={},s=[],f=o?"webkit":i?"ms":t?"Moz":"",u=(e=e.match(/AppleWebKit\/(\d+)/))&&~~e[1]<540,c=["transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","backface-visibility","perspective","perspective-origin"],m=d();function d(){return r.getComputedStyle(r.document.body,null)}function p(e,t,i){if(!e)throw new Error("No element specified!");if(E(t)){if(!(t in e.style)&&p.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+t);if(void 0===i)return e.style[t];e.style[t]=i}else{if(-1==s.indexOf(t)&&y(t),void 0===i)return e.style[l[t]];e.style[l[t]]=i}}function w(e,t){if(!e)throw new Error("No element specified!");var i,e=e.ownerDocument.defaultView.getComputedStyle(e,null);if(u&&-1=this.win.innerWidth||t.clientY<=0||t.clientY>=this.win.innerHeight)&&this.cancelInteraction()},TouchEventSimulator.prototype.handleDragStart=function(t){return t.preventDefault(),!1},TouchEventSimulator.prototype.handlePointerDown=function(t){0==t.button&&(this.touch={identifier:0,target:t.target},this.updateTouchCoordinates(t),this.fireTouchEvent("touchstart",t))},TouchEventSimulator.prototype.handlePointerMove=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchmove",t))},TouchEventSimulator.prototype.handlePointerUp=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchend",t))},TouchEventSimulator.prototype.handlePointerCancel=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchcancel",t),this.touch=null)},TouchEventSimulator.prototype.fireTouchEvent=function(t,e){var n=this.doc.createEvent("HTMLEvents");n.initEvent(t,!0,!0),"touchend"==t||"touchcancel"==t?(n.touches=n.targetTouches=[],n.changedTouches=[this.touch]):n.touches=n.targetTouches=n.changedTouches=[this.touch],e.target.dispatchEvent(n)},TouchEventSimulator.prototype.cancelInteraction=function(){this.touch&&(this.fireTouchEvent("touchcancel",this.touch),this.touch=null)};;
function SwipeListener(t){var a,n,c,h,e=t.target,o=t.swipeNodeGetter,i=t.swipe,u=t.minLength||50,r=Object.create(ClickPreventer).initClickPrevention(function(){return e});function s(t,e){return Math.abs(t)>Math.abs(e)?0Math.min(50,u)&&(null===c?c=s(e,t):(e=s(e,t),c!=e&&d())))}function g(t){d(),u<=h&&(i(c,h),r.attachClickPreventionHandler())}attach(window,"touchstart",noop,!1),attach(e,"touchstart",function(t){creative.adapter.useNativeClickForTapDetection||t.preventDefault(),1==t.touches.length&&(a=t.changedTouches[0].pageX,n=t.changedTouches[0].pageY,h=0,c=null,attach(o(),"touchmove",l,!1),attach(o(),"touchend",g,!1),r.detachClickPreventionHandler())},!1)};
var ClickPreventer={initClickPrevention:function(e){return this._getDefaultClickPreventionNode=e||function(){},this._clickPreventionNode=null,this._clickPreventionHandler=this._clickPreventionHandler.bind(this),this},attachClickPreventionHandler:function(e){creative.adapter.nativeClickEmittedOnSwipe&&!this._clickPreventionNode&&(this._clickPreventionNode=e||this._getDefaultClickPreventionNode(),attach(this._clickPreventionNode,"click",this._clickPreventionHandler,!0))},detachClickPreventionHandler:function(){creative.adapter.nativeClickEmittedOnSwipe&&this._clickPreventionNode&&(detach(this._clickPreventionNode,"click",this._clickPreventionHandler,!0),this._clickPreventionNode=null)},_clickPreventionHandler:function(e){e.stopPropagation(),this.detachClickPreventionHandler()}};;
function PlaceboBar(i,n,r,e){var t=!1,l=document.createElement("div"),a=(l.className="celtra-placebobar",l.style.cssText="position: absolute; bottom: 60px; left: 0; right: 0; margin: auto; z-index: 20; width: 215px; height: 8px;",document.createElement("img")),a=(a.src=creative.resourceUrl+"runner/clazzes/CreativeUnit/loading-back.png",a.style.position="absolute",a.style.width="100%",a.style.height="100%",l.appendChild(a),document.createElement("div")),o=(a.style.position="absolute",a.style.top="2px",a.style.bottom="2px",a.style.left="3px",a.style.right="3px",l.appendChild(a),document.createElement("div"));return o.style.background="url("+creative.resourceUrl+"runner/clazzes/CreativeUnit/loading-over.png) "+e+" repeat-x",o.style.position="absolute",o.style.width="0",o.style.height="100%",a.appendChild(o),l.start=function(){var a;t||(t=!0,a=new Date,setTimeout(function e(){if(!l.parentNode)return;var t=Math.min((new Date-a)/i,n);o.style.width=100*t+"%";tthis.slidingWindow&&this.signals.shift(),i={x:(i=this.signals.reduce(function(i,e){return{x:i.x+e.x,y:i.y+e.y,z:i.z+e.z}})).x/this.signals.length,y:i.y/this.signals.length,z:i.z/this.signals.length},this.prevSignal&&(e=null,h=Math.abs(i.x-this.prevSignal.x),s=Math.abs(i.y-this.prevSignal.y),t=Math.abs(i.z-this.prevSignal.z),90===Math.abs(creative.adapter.orientation)&&(n=s,s=h,h=n),sthis.shakeThreshold?e="x":hthis.shakeThreshold?e="y":hthis.shakeThreshold&&(e="z"),(h>this.shakeThreshold||s>this.shakeThreshold||t>this.shakeThreshold)&&this.emit("shake",e)),this.prevSignal=i)};;
!function(){"use strict";t=window.navigator.userAgent,e=window.navigator.vendor,i=!!document.fonts;var t,e,i,r=/Apple/.test(e)?(e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(t))?i&&603=this._targetTime?(this.pause(),this.value=this._targetValue,defer(this._callback||noop),this._startValue=null,this._startTime=null,this._targetValue=null,this._targetTime=null,this._callback=null):this.value=Math.pow(i/this._targetTime,this.options.exp)*e+this._startValue};;
function ThresholdObserver(e){this.threshold=e,this._value=null}extend(ThresholdObserver.prototype,EventEmitter),Object.defineProperty(ThresholdObserver.prototype,"value",{get:function(){return this._value},set:function(e){var t,h;null!==this._value&&this._value!==e&&(t=this._value-this.threshold)*(h=e-this.threshold)<=0&&(t<0?this.emit("up"):h<0&&this.emit("down")),this._value=e}});;
function BaseCreativeUnit(){}inherit(BaseCreativeUnit,View),BaseCreativeUnit.IGNORABLES=["INPUT","SELECT","TEXTAREA","BUTTON"],BaseCreativeUnit.prototype.awake=function(){BaseCreativeUnit.uber.awake.call(this),this._availableSize={width:0,height:0},this._isRendering=!1,this._engagementTracker=null,this._rxState=null,this._rxStateCopies=[]},BaseCreativeUnit.prototype.createNode=function(){return Logger("unit").log("Starting to load "+this),this.on("loaded",creative.adapter.perf.start("CreativeUnit.load").end),creative.experiments.get("TrackingLoadingTimes")&&this.once("_firstScreenLoaded",function(){var e,t=Date.now()-1e3*creative.runtimeParams.payloadJsClientTimestamp;t<3e4&&(e={unitName:this.name},creative.aggregatorTracking.trackAggregator("unitLoadTime",t,e),creative.aggregatorTracking.trackAggregator("unitLoadSuccesses",e))}.bind(this)),creative.adapter.on("mediaStopRequested",function(e){this.emit("mediaStopRequested",e)}.bind(this)),this.unitDiv=BaseCreativeUnit.uber.createNode.call(this),this._engagementTracker=new EngagementTracker(this.unitDiv,creative),Tapper(this.unitDiv,this.useClickForTap),attach(this.unitDiv,"touchstart",this._handleTouchStart.bind(this)),attach(this.unitDiv,"touchmove",this._handleTouchMove.bind(this)),this.unitDiv},BaseCreativeUnit.prototype.setAvailableSize=function(e,t){var r=this._availableSize.width!=e||this._availableSize.height!=t;return this._availableSize.width=e,this._availableSize.height=t,r},BaseCreativeUnit.prototype.getAvailableSize=function(){return{width:this._availableSize.width,height:this._availableSize.height}},BaseCreativeUnit.prototype.enterRenderTree=function(){throw new Error("Not implemented")},BaseCreativeUnit.prototype.exitRenderTree=function(){throw new Error("Not implemented")},BaseCreativeUnit.prototype.finishedLoading=function(){BaseCreativeUnit.uber.finishedLoading.call(this),Logger("unit").log("Finished loading "+this)},BaseCreativeUnit.prototype.getAccessibilityProperties=function(){throw new Error("Not implemented")},BaseCreativeUnit.prototype.openAccessibilityUrl=function(e){var t=new ActionContext(this.currentScreen);this.goToURLAction(t,{url:e,reportLabel:e},noop)},BaseCreativeUnit.prototype._handleTouchStart=function(e){if(!this.swipeable&&!creative.adapter.useNativeClickForTapDetection){for(var t=e.target;1!=t.nodeType;)t=t.parentNode;var r=function(){for(;t!==this.unitDiv;){if(t.className&&hasClass(t,"map-container"))return!0;t=t.parentNode}return!1}.bind(this);-1!=BaseCreativeUnit.IGNORABLES.indexOf(t.nodeName)||r()||e.preventDefault()}},BaseCreativeUnit.prototype._handleTouchMove=function(e){this.swipeable||e.preventDefault()},BaseCreativeUnit.prototype.createRxState=function(){this._rxState=this._generateNewRxStateObject()},BaseCreativeUnit.prototype._generateNewRxStateObject=function(){return new StateObject({left:null,top:null,right:null,bottom:null,width:null,height:null,vw:null,vh:null,x:null,y:null,pageYOffset:null})},BaseCreativeUnit.prototype.updateRxState=function(e){var t;this._rxState&&(e=getElementRectRelativeToTopViewport(e),t=creative.adapter.getTopWindow(),this._rxState.left=~~e.left,this._rxState.top=~~e.top,this._rxState.right=~~e.right,this._rxState.bottom=~~e.bottom,this._rxState.width=~~e.width,this._rxState.height=~~e.height,this._rxState.vw=t.innerWidth,this._rxState.vh=t.innerHeight,this._rxState.pageYOffset=t.pageYOffset,this._rxState.x=~~(e.left+e.width/2-t.innerWidth/2),this._rxState.y=~~(e.top+e.height/2-t.innerHeight/2),this._rxStateCopies.forEach(function(e){e.copyFrom(this._rxState)}.bind(this)))},BaseCreativeUnit.prototype.getRxStateObject=function(){var e;return this._rxState?((e=this._generateNewRxStateObject()).copyFrom(this._rxState),this._rxStateCopies.push(e),e):null},BaseCreativeUnit.prototype.goToScreenAction=function(e,t,r){throw new Error("Not implemented")},BaseCreativeUnit.prototype.alertAction=function(e,t,r){this.alert({message:t.text},r)},BaseCreativeUnit.prototype.checkOrientationAction=function(e,t,r){var a,i=creative.adapter.orientation;0===i||180===i?a=t.onPortrait:-90!=i&&90!=i||(a=t.onLandscape),a?a(e,r):r()},BaseCreativeUnit.prototype.checkOrientationActionDryRun=BaseCreativeUnit.prototype.checkOrientationAction,BaseCreativeUnit.prototype._processURLParams=function(e){return"string"!=typeof e?e:creative.macros(e)},BaseCreativeUnit.prototype._addUrlAppendage=function(e){var t;return creative.urlOpenedUrlAppendage?(t=this.size.width+"x"+this.size.height,e+(0<=e.indexOf("?")?"&":"?")+creative.urlOpenedUrlAppendage.replace(new RegExp("{celtraFirstUnitSize}","ig"),t)):e},BaseCreativeUnit.prototype.openBrowser=function(e,t,r,a){if(!t)return(r||noop)();creative.adapter.trackEventsAndOpenBrowser(this._processURLParams(t),creative.shouldClickThroughToNewWindow(e),r,a)},BaseCreativeUnit.prototype.openClickThroughDestinationAction=function(e,t,r){var a=creative.clickThroughDestinationUrl,i=creative.shouldClickThroughToNewWindow(e),n=!1,o="clickThroughDestinationOpened",s=function(){n||(n=!0,creative.adapter.openBrowser(this._processURLParams(a),i))}.bind(this);a&&-1==["http://","https://"].indexOf(a)?(creative.adapter._stopAllMedia(),0this.size.width||t>this.size.height)&&(r.style.backgroundSize="contain"),a.color&&(r.style.backgroundColor=a.color),attach(r,"tap",function(e){r.parentNode.removeChild(r),i()},!1),document.createElement("div"));e.className="celtra-back-button touchable "+this.alignBackButtonHorizontal,r.appendChild(e)}.bind(this);a.file.meta?r(a.file.meta.width,a.file.meta.height):((t=new Image).onload=function(){r(this.width,this.height)},t.onerror=function(e){return console.error("Couldn't display image: "+a.file.getUrl()),i()},t.src=a.file.getUrl())},BaseCreativeUnit.prototype.saveImageAction=function(i,n,o){var e,s="imageSaveAttempted";function r(e,t){var r=e.getOriginalUrl(),a=e.name,e=e.blobHash;i.track({name:s,blobHash:e,label:n.reportLabel}),i.trackClickThrough(),creative.adapter.canSaveImage()?creative.adapter.trackingCenter.flush(function(){var e="shared.png",e=(void 0!==a?e=a:"string"==typeof t&&0=this._serverReportedDuration||(e=!this._serverReportedDuration||t.tothis._currentTime&&(this._currentTime=this._video.currentTime),this._currentTime},t.prototype.start=function(){this._running||(this._running=!0,this._viewDirectionsObserver&&this._viewDirectionsObserver.start(),s().mediaState.startVideo(),this._firstSegmentEmitted||(this._currentTime=this.getCurrentTime()+.01,this.trackVideoPlayedSegment({from:0,to:this.getCurrentTime()}),this._firstSegmentEmitted=!0),this._playedSegmentComputationUnit.init(this.getCurrentTime()),clearInterval(this._intervalId),this._intervalId=setInterval(this.tick,250))},t.prototype.stopAndReset=function(){this.stop(!0),this._playedSegmentComputationUnit&&(this._playedSegmentComputationUnit.reset(),this._currentTime=0,this._firstSegmentEmitted=!1,this._viewDirectionsObserver&&this._viewDirectionsObserver.reset())},t.prototype.flush=function(){this._playedSegmentComputationUnit&&this._playedSegmentComputationUnit.flush()},t.prototype.stop=function(t){(this._running||t)&&(this._running&&(s().mediaState.stopVideo(),this._running=!1,clearInterval(this._intervalId)),this._viewDirectionsObserver&&this._viewDirectionsObserver.stop(),this._playedSegmentComputationUnit.addEvent(this.getCurrentTime()),this._playedSegmentComputationUnit.flush(t))},t.prototype.trackDurationChange=function(){var t,e,i,s;this.checkDuration&&(t=this._video.duration,e=-1!==n.indexOf(t),i=-1!==r.indexOf(t),s=t!==this._lastObservedDuration,e||i||!s||(this._serverReportedDuration=t,this.emit("videoDurationUpdate",{duration:t}),this._lastObservedDuration=t))},t.prototype.tick=function(){this.trackDurationChange();var t=this.getCurrentTime(),e=Date.now()-(this._lastTickTime||Date.now());t==this._lastObservedPosition&&1e3Math.min(1,.25*i)},videoFirstQuartile:function(n,t,i){i*=.25;return nMath.max(.75*i,i-2)}};window.QuartileEventsEmitter=function(n){n.QUARTILE_EVENTS=i;var r={},u=(Object.keys(i).forEach(function(n){r[n]=i[n]}),null),t=function(){var n,t=null===u||null!==u&&this.currentTime>u?this.currentTime:u,i=(n=this).serverReportedDuration||(-1!==o.indexOf(n.duration)?null:n.duration);if(null!==i&&null!==u&&t&&t-u<1)for(var e in 0e&&(t.apply(n,arguments),o.lastCall=Date.now())}},o.isFunction=function(t){return"function"==typeof t},o.constantly=function(t){return function(){return t}},o.hash=function(){for(var t=Array.prototype.slice.apply(arguments),e=0,n=0;n>1,marginVertical:r>>1}},o.removeUnits=function(t){return parseInt(t.replace(/[a-z]+/,""))},o.capitaliseFirstLetter=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},o.createHandlerName=function(t,e){return(e=e||"on")+o.capitaliseFirstLetter(t)},o.forEach=function(t,e,n){for(var i in t)e.call(n,t[i],i,t)},o.changeStyle=function(t,e,n){for(var i,r=0;rthis._lastPlayingPosition&&(this._lastPlayingPosition=t),this._lastPlayingPosition-this._startPlayingPosition>=this.maxPlayingSegmentLength&&this.flush()},t.prototype.flush=function(t){var i,n;null!=this._startPlayingPosition&&(i=this._startPlayingPosition,n=this._lastPlayingPosition,(t||.4this._duration?this._duration:t)>=this._completionMarker,e=(this._last.inCompletionWindow&&!i&&(this._last=this._initState()),Math.floor(t)+1);if(this._last.playingSecond!=e){var a=this._last.playingSecond>e?0:this._last.playingSecond;if(a+1=this._quartileDurations[i]&&(delete this._quartileDurations[i],this.emit(i,t))},s.prototype._emitVideoDurationUpdate=function(t){this.emit("videoDurationUpdate",t)},t.PlaybackTrackingEventsEmitter=s}(this);;
!function(t){function i(t,i,e){this._context=i,this._prefix=e||"video",["start","firstQuartile","midpoint","thirdQuartile","complete"].forEach(function(i){t.on(i,function(t){this._context.track({name:this._prefix+ucfirst(i),position:t}),"start"===i&&creative.trackCreativeRenderedOnVideoStart()}.bind(this))},this),["secondPlayed","secondReplayed"].forEach(function(i){t.on(i,function(t){this._context.track(extend({name:this._prefix+ucfirst(i)},t))}.bind(this))},this),t.on("videoDurationUpdate",function(t){this._context.track({name:this._prefix+ucfirst("videoDurationUpdate"),duration:t})}.bind(this))}extend(i.prototype,EventEmitter),i.prototype.changeContext=function(t){this._context=t},t.PlaybackTrackingEventsRecorder=i}(this);;
!function(){var A=[".video-player-wrapper {"," position: absolute;"," width: 100%;"," height: 100%;"," background: #000;"," top: 0;"," left: 0;"," overflow: hidden;","}",".video-player-engine {"," position: absolute;"," width: 100%;"," height: 100%;"," min-height: 100%;"," top: 0;"," left: 0;"," margin: 0;"," padding: 0;"," overflow: hidden;","}",".video-player-engine video,",".video-player-engine .canvasContainer","{"," position: relative;"," width: 100%;"," height: 100%;"," min-height: 100%;"," background: #000;"," top: 0;"," left: 0;","}",".video-player-poster {"," position: absolute;"," background-size: contain;"," background-repeat: no-repeat no-repeat;"," background-position: center center;","}",".video-player-fitting-crop .video-player-poster {"," background-size: cover;","}",".video-player-engine canvas {"," position: relative;"," width: 100%;"," background: #000;"," top: 0;"," left: 0;","}",".video-player-engine canvas {"," image-rendering: optimizeSpeed;"," image-rendering: -moz-crisp-edges;"," -ms-interpolation-mode: nearest-neighbor;"," image-rendering: optimize-contrast;"," image-rendering: -webkit-pixelated;"," image-rendering: crisp-edges;"," image-rendering: -webkit-optimize-speed;"," image-rendering: -webkit-optimize-contrast;","}",".video-player-wrapper-empty {"," background-color: #000;","}",".video-player-wrapper-empty::after {",' content: "";'," position: absolute;"," top: 0;"," left: 0;"," right: 0;"," bottom: 0;",' background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCIgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4Ij48cGF0aCBmaWxsPSIjY2NjIiBkPSJNMSAxNGMwIDcuMiA1LjggMTMgMTMgMTNzMTMtNS44IDEzLTEzUzIxLjIgMSAxNCAxIDEgNi44IDEgMTR6bTI0IDBjMCA2LjEtNC45IDExLTExIDExUzMgMjAuMSAzIDE0IDcuOSAzIDE0IDNzMTEgNC45IDExIDExem0tMTQtNHY4bDctNC03LTR6Ii8+PC9zdmc+");'," background-repeat: no-repeat;"," background-position: center;","}",".video-controls-container {"," position: absolute;"," width: 100%;"," height: 100%;"," top: 0;"," left: 0;"," font-size: 14px;","}",".video-basic-controls-wrapper {"," position: absolute;"," width: 100%;"," height: 100%;","}",".video-controls-slider-container {"," position: absolute;"," width: 100%;"," height: 8px;"," bottom: -1px;"," left: 0;"," background: #111;","}",".video-controls-progress-bar {"," opacity: 0.3;","}",".video-controls-progress-bar,",".video-controls-time-bar {"," position: absolute;"," width: 0;"," top: 0;"," left: 0;"," height: 100%;","}","@-webkit-keyframes video-player-spin{"," 0% { -webkit-transform: rotate(0deg); }"," 100% { -webkit-transform: rotate(359deg); }","}","@-moz-keyframes video-player-spin{"," 0% { -moz-transform: rotate(0deg); }"," 100% { -moz-transform: rotate(359deg); }","}","@keyframes video-player-spin{"," 0% { transform: rotate(0deg); }"," 100% { transform: rotate(359deg); }","}",".video-player-spinner-big,",".video-player-spinner-small {"," display: block;"," position: absolute;"," top: 50%;"," left: 50%;"," -webkit-animation: video-player-spin 1.5s infinite linear;"," animation: video-player-spin 1.5s infinite linear;","}",".video-player-spinner-big {"," width: 35px;"," height: 35px;"," margin-top: -17px;"," margin-left: -17px;",' background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAQAAAC00HvSAAADTklEQVR4AZWVTWgcZRyHn/c/7zubbDbJJsTEioiIH7EGq6EIRqwWqbRClXrx4E0QxYt3b4qK9qgoePDmwRYVS6xFW7Ueeqj0kqIVQYwljTVt0o/dZD9n3r/zshGSGpOd54GZ0+9h/qcxbMh03PfK4LPl8cFy0SJsialxIyfHRz+6Y6pkDR0xXWQ8azlaGvt0fF9sMsiTsazh2933fzEyKICu2+bKfP/izg96IlDA6JXmhdPVY81T6Xk2wAuCz1zFTNOh+PKD71sRMIZqY3aa59iERYtktvDrMm735LGCNQaE38/O7WGRzRBCJljrhCyB0l2HXKSgxpw7zt4xNmcBZNUSlU4XGPl4aEhRVc595fd6tvKm8LAEY4qrR0V3T87YyGDMn2d4mC6ZL9JDmEm6gBcYPhiJqlJdnt8/T7dSQ0JEhQEQ4m2Ph4jq3GdDi0N0Lw21arHSL0jP84WCZlQqV1+6Sh5ZRoix9PiiLe1TBbj0w4gnJ4v1qBeQqN8W79HQYeU78tPAIqBFWxwNFbR1mvy0iMEY+qyNvRK4SH68cQAGiaz64MTCBHndkRhngr3SbnYyM6Mz5NYah81EWnXN8D66OSKvxBrjMpH6X+ozNd4Rk1dKxgW1KbVfskpGYapAXqNRXGakdal/o1kHX95VJq/RbcYFWZLGkVY1fE+hvPT6Enmc2y5lnIk0TS8LraXjeM0ceqY6UKVrrbsvRHD+gvViqbyTtvDex4PD7w3Tre4xUzYOhyS/JUiCP3/pkPd49eVH2m+36cbqLrcdR2Rs8qutWcRiqbxRm9c0HDZywLxp2MrGE/FDxoo1VivJTEKCmSYQPXDrJ+LIQppeO3n9NZb5P+LC0+5eEm2Tar12mCvr/lPxU9veNRIy6luXK0f4kA1I9hR2Sp9PSLJIo/4lsxAwR/kX++TYWyZWT6qZrb9rp9pnkj/8dSqUon5zi73TTUhJs4QGV+qfh8h/MmAmRg7GYyGiXpPMlLbP3rS1Y6oJLU3Upxebh1lYs/yataQ9pVcH9hsJqdVMmHYS7ZAm0Ubjx9YJEtZgprmRaKz3hb5HpTeESHyIZYFOIq00f2qe4BqBTTMdrJuKJ+3t0bAUsH7FV5KFZLb9c3oWzwb8AzjvQbz9lli3AAAAAElFTkSuQmCC");',"}",".video-player-spinner-small {"," width: 18px;"," height: 18px;"," margin-top: -9px;"," margin-left: -9px;",' background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAQAAAD8x0bcAAABeElEQVR4AXXSv2sTYRjA8e89997lcuR60eJQUdpFQQoqdHRWhAoddPBPcHRwE8TZxcXJf0BEsIjuQUQQtZMOpREM9RKL1RrqJbkf771nEGnKJf1+hmd5eKaHSe/vtzf30k63Q9X/8XZte6f8V/QrokopILq9/CB0+nnUip/l7zioUJgxrBbu6rnnodvp9G6wwaG04AEJRvAWHjXcr+3tC3pDcxhmzGcOpH7rxOm9uHfN3repIkMkwJPguljfXwVbAdOaBm3V7VD8pVE2fDpkNhJcQqXqOi+2OKrxJRxVFkXB0Ql1tKS/QZaE2fAkQGS4KbZ3xWM2+xRzpDJYz5Pw6mBxwLQ/vlq2XLMj6ZP9T7VjzYfGN1Qo97IslD9NV8j6d0e7wUrzsSwKExyv3XTOl1n2AWO1AHdt/p4Kkm/xy/xN2cMwb591Lkqj+JGs0wbrNQCy0rjjnQHdN7EZkYOJs8/ZC7pwsASgVp1L6qRVK9NiV3/RHyc/8RftSMiO8WZLaAAAAABJRU5ErkJggg==");',"}",".video-controls-hiddable,",".video-controls-unhiddable {"," width: 100%;"," height: 100%;","}",".video-basic-controls-wrapper .center-button {"," position: absolute;"," width: 4em;"," height: 4em;"," border-top-left-radius: 2em;"," border-top-right-radius: 2em;"," border-bottom-left-radius: 2em;"," border-bottom-right-radius: 2em;"," background: #111;"," margin: auto;"," top: 0;"," left: 0;"," bottom: 0;"," right: 0;"," text-align: center;"," cursor: pointer;"," opacity: 0.8;"," z-index: 1;","}",".center-button div {"," position: relative;"," width: 100%;"," color: white;"," font-size: 2em;"," top: 0.5em;","}",".center-button .celtra-icon-play { left: 0.1em;}",".center-button .celtra-icon-replay { top: 0.62em; left:0.05em}",".video-basic-controls-wrapper .custom-button {"," position: absolute;"," height: 100%;"," width: 100%;"," top: 0;"," left: 0;"," cursor: pointer;"," opacity: 0.8;","}",".custom-button img {"," margin: auto;"," position: absolute;"," top: 0;"," right: 0;"," bottom: 0;"," left: 0;","}",".video-controls-button {"," position: absolute;"," cursor: pointer;"," font-size: 1.5em;"," color: white;"," width: 2.5em;"," height: 2.5em;","}",".video-controls-desktop .video-controls-button div {"," margin-top: -0.5em;","}",".ie-click-event {"," background-color: rgba(255,255,255,0);","}",".video-controls-button-shadow {"," text-shadow: 1px 1px 3px #000;","}",".video-controls-button-top-right {"," right: 0;"," top: 0;","}",".video-controls-desktop .video-controls-button-top-right {"," margin-right: 0.5em;"," margin-top: 0.5em;"," width: 1.5em;"," height: 1.5em;","}",".video-controls-button-bottom-right {"," right: 0;"," bottom: 0;","}",".video-controls-desktop .video-controls-button-bottom-right {"," margin-right: 0.5em;"," margin-bottom: 0.75em;"," width: 1.5em;"," height: 1.5em;","}",".video-controls-button div {"," position: absolute;"," height: 50%;"," width: 100%;"," left: 0;"," text-align: center;"," top: 50%;"," margin-top: -0.75em;"," vertical-align: middle;","}",".video-controls-button .celtra-icon-close {"," font-size: 0.7em;"," left: 0.07412em;","}",".video-controls-button .celtra-icon-enter-full-screen,",".video-controls-button .celtra-icon-exit-full-screen {"," left: 0.09em;","}",".video-controls-pending {"," animation: video-controls-pending 1s infinite linear;","}","@-webkit-keyframes video-controls-pending {"," 0% { opacity: 1 }"," 50% { opacity: 0 }"," 100% { opacity: 1 }","}","@keyframes video-controls-pending {"," 0% { opacity: 1 }"," 50% { opacity: 0 }"," 100% { opacity: 1 }","}","@font-face {",' font-family: "celtraicons";',' src:url("data:application/font-woff;base64,d09GRk9UVE8AAAqEAAoAAAAACjwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAABq8AAAavkHaHf09TLzIAAAekAAAAYAAAAGAIIvzDY21hcAAACAQAAABMAAAATBpVzGRnYXNwAAAIUAAAAAgAAAAIAAAAEGhlYWQAAAhYAAAANgAAADb/fCRYaGhlYQAACJAAAAAkAAAAJAPjAfJobXR4AAAItAAAAEgAAABIHLIB9G1heHAAAAj8AAAABgAAAAYAElAAbmFtZQAACQQAAAFdAAABXWEQuipwb3N0AAAKZAAAACAAAAAgAAMAAAEABAQAAQEBDGNlbHRyYWljb25zAAECAAEAOvgcAvgbA/gYBB4KABlT/4uLHgoAGVP/i4sMB4pq+JX4dAUdAAAA0A8dAAAA1REdAAAACR0AAAamEgATAQEMFxkbHiMoLTI3PEFGS1BVWl9kY2VsdHJhaWNvbnNjZWx0cmFpY29uc3UwdTF1MjB1RTYwMHVFNjAxdUU2MDJ1RTYwM3VFNjA0dUU2MDV1RTYwNnVFNjA3dUU2MDh1RTYwOXVFNjBBdUU2MEJ1RTYwQ3V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AAAAQAAAAAAAAAAAAAAIAAAAAAAAgAAAAMAAAAUAAMAAQAAABQABAA4AAAACgAIAAIAAgABACDmDf/9//8AAAAAACDmAP/9//8AAf/jGgQAAwABAAAAAAAAAAAAAAABAAH//wAPAAEAAAABAAAXLCAzXw889QALAgAAAAAAzy5xzgAAAADPLnHO////3wIBAeAAAAAIAAIAAAAAAAAAAQAAAeD/4AAAAgD/////AgEAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAABAAAAAgAAAAIAAAABsQAAAgD//wIAAG8CAAAAAgAAiwIAAGUCAABOAgAAFwIAAAoCAAAmAgAAAAIAAAEAAFAAABIAAAAAAA4ArgABAAAAAAABABYAAAABAAAAAAACAA4AYwABAAAAAAADABYALAABAAAAAAAEABYAcQABAAAAAAAFABYAFgABAAAAAAAGAAsAQgABAAAAAAAKACgAhwADAAEECQABABYAAAADAAEECQACAA4AYwADAAEECQADABYALAADAAEECQAEABYAcQADAAEECQAFABYAFgADAAEECQAGABYATQADAAEECQAKACgAhwBjAGUAbAB0AHIAYQBpAGMAbwBuAHMAVgBlAHIAcwBpAG8AbgAgADEALgAwAGMAZQBsAHQAcgBhAGkAYwBvAG4Ac2NlbHRyYWljb25zAGMAZQBsAHQAcgBhAGkAYwBvAG4AcwBSAGUAZwB1AGwAYQByAGMAZQBsAHQAcgBhAGkAYwBvAG4AcwBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4AAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="),',' url("data:font/truetype;base64,AAEAAAALAIAAAwAwT1MvMggi/MMAAAC8AAAAYGNtYXAaVcxkAAABHAAAAExnYXNwAAAAEAAAAWgAAAAIZ2x5ZtKQLWwAAAFwAAAJfGhlYWT/fCRYAAAK7AAAADZoaGVhA+MB8gAACyQAAAAkaG10eByyAfQAAAtIAAAASGxvY2EUzhFSAAALkAAAACZtYXhwABgAwAAAC7gAAAAgbmFt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AAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=");'," font-weight: normal;"," font-style: normal;","}",'[class^="celtra-icon-"], [class*=" celtra-icon-"] {',' font-family: "celtraicons";'," speak: none;"," font-style: normal;"," font-weight: normal;"," font-variant: normal;"," text-transform: none;"," line-height: 1;"," -webkit-font-smoothing: antialiased;"," -moz-osx-font-smoothing: grayscale;","}",'.celtra-icon-redo:before { content: "\\e600"; }','.celtra-icon-close:before { content: "\\e60d"; }','.celtra-icon-go-landscape:before { content: "\\e603"; }','.celtra-icon-twitter:before { content: "\\e605"; }','.celtra-icon-facebook:before { content: "\\e606"; }','.celtra-icon-phone:before { content: "\\e607"; }','.celtra-icon-play:before { content: "\\e608"; }','.celtra-icon-pause:before { content: "\\e609"; }','.celtra-icon-exit-full-screen:before { content: "\\e60a"; }','.celtra-icon-enter-full-screen:before { content: "\\e60b"; }','.celtra-icon-unmute:before { content: "\\e60c"; }','.celtra-icon-mute:before { content: "\\e601"; }','.celtra-icon-replay:before { content: "\\e602"; }','.celtra-icon-close2:before { content: "\\e604"; }',".spinner .center-button {"," display: none;","}",".web-audio .celtra-icon-mute, .web-audio .celtra-icon-unmute { color: red; }",""].join("\n");this.VideoPlayerCss=A}();;
!function(){function t(e){switch(e){case"video/mp4":return"video.mp4";case"video/webm":return"video.webm";case"video/avi":return"video.avi";case"audio/mp4":return"audio.m4v";default:throw new Error("Unknown mime type")}}var n={startMuted:!1,preload:!1,from:null,to:null,blobHash:null,hasAudio:!0,skipCodecs:[],codecPriority:["vp9","h265","h264","vp8"],transcodingGroup:"inline",customUrlParameters:{},forceMPEG4Video:!1,forceMPEG1Video:!1},a=CeltraPlayerUtils.composeUrl,c=CeltraPlayerUtils.filterObject,s=CeltraPlayerUtils.getUrl,u=(createSourceObject=CeltraPlayerUtils.createSourceObject,generateMediaType=CeltraPlayerUtils.generateMediaType,VideoEngineProvider={},{vp9:{low:["vp9_served_480p"],medium:["vp9_served_720p"],high:["vp9_served_1080p"]},h265:{low:["x265_served_480p"],medium:["x265_served_1080p"],high:["x265_served_1080p"]},h264:{low:["mpeg4HQ"],medium:["mpeg4HQPlus"],high:["mpeg4HD"]},vp8:{low:["webmHQ"],medium:["webmHQ"],high:["webmHD"]}}),l=function(e,r){return!!{h265:deviceInfo.browser.chrome(),vp9:deviceInfo.os.android(null,"7.1")||r.isVideo360&&deviceInfo.browser.firefox()||deviceInfo.browser.safari()&&deviceInfo.deviceType.desktop()}[e]},d=function(){return deviceInfo.deviceType.desktop()||deviceInfo.os.ios("10",null)&&!deviceInfo.browser.chrome(null,"64")||deviceInfo.os.android()&&deviceInfo.browser.chrome("53",null)&&!deviceInfo.browser.samsung()||deviceInfo.os.android()&&deviceInfo.browser.samsung("6.4",null)},v=(AudioEngineProvider={},function(e){return"undefined"!=typeof creative?(e=creative.videoTranscodingPresets[e]&&creative.videoTranscodingPresets[e].algoVersion,creative.version+(e?"-"+e:"")):null});VideoEngineProvider.createVideoEngineSpec=function(e,r){var r=merge(n,r),i=(r.skipCodecs=r.skipCodecs.filter(function(e){return-1===["h264","vp8"].indexOf(e)}),"1"==r.campaignExplorer&&(r.startMuted=!0),o=e,(i=r).forceMPEG4Video||!i.forceMPEG1Video&&!i.fallbackToMPEG1&&(d()||o)?"html5":"jsVideo"),o={inUserInitiatedThread:e,startMuted:r.videoElement?r.videoElement.muted:r.startMuted};return"jsVideo"==i?merge({clazz:"JsVideoEngine",presets:[(i=r).fallbackToMPEG1?"mpeg1LQVideo":"mpeg1SHQVideo"],engineType:"mpeg1",doAVSync:i.hasAudio&&!i.isTeaser,isTeaser:i.isTeaser,preload:i.preload,options:{}},o):merge(function(r,e){var i="";if(r.isMasterVideo)if(deviceInfo.deviceType.desktop()&&!r.capStreamAtHQPlus)i="high";else i="medium";else if((deviceInfo.deviceType.desktop()||r.isVideo360||r.hqQuality||r.isSnapchatFormat)&&!r.isTeaser)i="medium";else i="low";var o=r.codecPriority.filter(function(e){return r.skipCodecs.indexOf(e)===-1&&!l(e,r)}).map(function(e){return u[e][i]}).reduce(function(e,r){return e.concat(r)},[]).filter(function(e){return creative.videoTranscodingGroups[r.transcodingGroup].indexOf(e)!==-1});if(r.videoElement){var n=document.createElement("video");var d=["","maybe","probably"];var t=o.map(function(e){var r=creative.videoTranscodingPresets[e].mediaType;var i=deviceInfo.browser.chrome()&&e.indexOf("mpeg4")===0?"probably":n.canPlayType(generateMediaType(r));return{id:e,canPlayType:i}}).sort(function(e,r){if(e.canPlayType===r.canPlayType)return 0;return d.indexOf(e.canPlayType)>d.indexOf(r.canPlayType)?-1:1}).shift().id;o=[t]}var a=!deviceInfo.deviceType.desktop()&&r.isVideo360&&e&&!r.startMuted,c;return{clazz:deviceInfo.os.ios(null,"10")&&r.isVideo360?"CrossOriginHtml5VideoEngine":"Html5VideoEngine",presets:o,engineType:"html5",doAVSync:a,isTeaser:r.isTeaser,preload:r.preload,crossOrigin:true,options:{}}}(r,e),o)},VideoEngineProvider.createVideoSourceObjects=function(e,n){var d=e.doAVSync||e.isTeaser;return e.presets.map(function(e){r=n;var r=c(merge({from:r.from,to:r.to,muted:d?"1":null,transform:"VideoStream",celtraCacheBust:v(e)},r.customUrlParameters)),i=creative.videoTranscodingPresets[e].mediaType,o=t(i.mime);return createSourceObject(a(s("cachedApi"),"videoStream",n.blobHash,e,o,r),i)})},window.VideoEngineProvider=VideoEngineProvider,AudioEngineProvider.createAudioEngineSpec=function(e){return e.doAVSync?{clazz:"undefined"!=typeof AudioContext||"undefined"!=typeof webkitAudioContext?"WebAudioEngine":"Html5AudioEngine",preload:e.preload}:null},AudioEngineProvider.createAudioSourceObjects=function(n){return["aacAudio"].map(function(e){var r=n?(r=n,c(merge({from:r.from,to:r.to,transfom:"VideoStream",celtraCacheBust:v(e)},r.customUrlParameters))):{},i=creative.videoTranscodingPresets[e].mediaType,o=t(i.mime);return createSourceObject(a(s("cachedApi"),"videoStream",n.blobHash,e,o,r),i)})},window.AudioEngineProvider=AudioEngineProvider}();;
!function(i){function t(e,t,i,n,s){this._containerEl=e,this._opts=merge({},o,s),this._videoEngine=null,this._videoEngineSpecProvider=t,this.isUserGazing=n,this._doc=e.ownerDocument,this._win=this._doc.defaultView,this._initialized=!1,this._firstPlay=!0,this.silentPauseActive=!1,this._engineType=null,this._videoPresets=[],this._muted=!0,i&&(this._controlsController=i(this,this._opts),this._controlsController&&this._controlsController.on("userInteraction",this.emit.bind(this,"userInteraction"))),this._aspectRatio=this._opts.videoWidth/this._opts.videoHeight,this.isFullScreen=!this.playsInline(),this.isDesktop=this._opts.isDesktop,this.anchoringPoint=this._opts.anchoringPoint,this.buffered=0,this._state=null,this._posterShown=!0,this._seeked=!1,this._repeated=0,this.playSucceeded=!1,this._playingEmitted=!1,this._firstRenderEmitted=!1,this._timeUpdateCounter=0,this._lastTimeUpdateEmitted=0,this.play=this.play.bind(this),this.silentPlay=this.silentPlay.bind(this),this.pause=this.pause.bind(this),this.silentPause=this.silentPause.bind(this),this.mute=this.mute.bind(this),this.unMute=this.unMute.bind(this),this.redraw=this.redraw.bind(this),this.enterFullScreen=this.enterFullScreen.bind(this),this.exitFullScreen=this.exitFullScreen.bind(this),this.destroy=this.destroy.bind(this),this._onFullscreenChange=this._onFullscreenChange.bind(this),this._init(),this.changeState(CeltraPlayerUtils.UNSTARTED),this._fullScreenAncestors=[]}extend(t.prototype,StatefulEventEmitter),Object.defineProperty(t.prototype,"paused",{get:function(){return this._videoEngine&&this._videoEngine.paused}}),Object.defineProperty(t.prototype,"componentName",{get:function(){return this._opts.componentName}}),Object.defineProperty(t.prototype,"duration",{get:function(){return this.serverReportedDuration||this._videoEngine&&this._videoEngine.duration||0}}),Object.defineProperty(t.prototype,"serverReportedDuration",{get:function(){return this._opts.duration}}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this._videoEngine&&this._videoEngine.getCurrentTime()||0},set:function(e){this._videoEngine&&this._videoEngine.setCurrentTime(e)}}),Object.defineProperty(t.prototype,"reportsSeeking",{get:function(){return!(!this._videoEngine||!this._videoEngine.reportsSeeking)}}),Object.defineProperty(t.prototype,"muted",{get:function(){return this._muted}}),Object.defineProperty(t.prototype,"fullscreen",{get:function(){return this.isFullScreen}}),Object.defineProperty(t.prototype,"engineType",{get:function(){return this._engineType}}),Object.defineProperty(t.prototype,"videoPresets",{get:function(){return this._videoPresets}}),Object.defineProperty(t.prototype,"activeSrc",{get:function(){return this._videoEngine&&this._videoEngine.activeSrc}}),Object.defineProperty(t.prototype,"activePreset",{get:function(){return this._videoPresets&&this._videoPresets.filter(function(e){return this.activeSrc&&~this.activeSrc.indexOf(e)}.bind(this))[0]}}),Object.defineProperty(t.prototype,"engineInitialized",{get:function(){return this._initialized}}),Object.defineProperty(t.prototype,"ended",{get:function(){return this.isState(CeltraPlayerUtils.ENDED)}});var o={canShowSpinner:!0,closeFSOnEnd:!1,fitting:"fit",fullscreenMode:"both",pauseOnEnd:!1,playFrom:null,playTo:null,poster:"data:image/gif;base64,"+CeltraPlayerUtils.EMPTY_PIXEL,repeatTimes:0,videoWidth:160,videoHeight:100},n={loadstart:"onLoadStart",loadedmetadata:"onLoadedMetaData",durationchange:"onDurationChange",progress:"onProgress",timeupdate:["onTimeUpdate","onTimeUpdateRepeat"],canplay:"onCanPlay",play:"onPlay",playing:"onPlaying",pause:"onPause",autoplayrejected:"onAutoplayRejected",autoplaynotpossible:"onAutoplayNotPossible",forcemuted:"onForceMuted",ended:"onEnded",buffering:"onBuffering",endbuffering:"onEndBuffering",muted:"onMuted",unmuted:"onUnMuted",seeking:"onSeeking",seeked:"onSeeked",exitfullscreen:"onExitFullScreen",webkitendfullscreen:"onExitFullScreen",error:"onError",canunmute:"onCanUnMute",custominfo:"onCustomInfo",playersourceloading:"onPlayerSourceLoading",volumechange:"onVolumeChange"};t.DOM=['"],t.prototype._init=function(){var e;CeltraPlayerUtils.createDom(this._doc,t.DOM,this._opts,CeltraPlayerUtils.xBindFactory(this)),CeltraPlayerUtils.insertStyleTag("celtra-video-player-style",VideoPlayerCss,this._doc),this._controlsController&&(this._controlsEl=this._controlsController.render(this._doc),this._controlsWrapperEl.appendChild(this._controlsEl)),this._containerEl.appendChild(this._wrapperEl),this._posterShow(),this._controlsController&&this._controlsController.adjustSizes(this._containerEl.clientHeight),this._opts.preload&&(e=this.createSpecs(!1,this._opts.startMuted),this.initialize(e)),this.dtCanFullscreen=this.isDesktop&&this._toggleDesktopFSStateHandlers("add")},t.prototype.setDimensions=function(e,t){this.width=e,this.height=t,this.redraw(),this.emit("rendered")},t.prototype.getVideoElement=function(){return this._videoEngine},t.prototype.getControlsElement=function(){return this._controlsEl},t.prototype.getWrapperElement=function(){return this._wrapperEl},t.prototype._posterHide=function(){this._posterShown&&(this._posterShown=!1,this._posterEl.style.display="none")},t.prototype._posterShow=function(){this._posterShown||(this._posterShown=!0,this._posterEl.style.display="")},extend(t.prototype,{onLoadStart:function(){this.emit("loadstart")},onLoadedMetaData:function(){this.redraw(),this.emit("canunmute")},onCanPlay:function(){this.emit("canplay")},onDurationChange:function(){this.emit("durationchange")},onBuffering:function(){this.changeState(CeltraPlayerUtils.BUFFERING),this.emit("buffering")},onEndBuffering:function(){this.emit("endbuffering")},onPlayerSourceLoading:function(e){(this._opts.autoplay||e)&&this.emit("playersourceloading")},onMuted:function(){this._muted=!0,this.emit("muted")},onUnMuted:function(){this._muted=!1,this.emit("unmuted")},onVolumeChange:function(e){this._muted=0==e,this.emit(this._muted?"muted":"unmuted"),this.emit("volumechange",e)},onProgress:function(){"object"==typeof this._videoEngine.buffered&&0=this._opts.playTo&&(this._hasToBeRepeated()?this._doRepeat():(this.pause(),this._doEnd()))},onPlay:function(){this.emit("play")},onPlaying:function(){this.emit("playing"),this.changeState(CeltraPlayerUtils.PLAYING),this.playSucceeded=!0,this.redraw()},onPause:function(){this.changeState(CeltraPlayerUtils.PAUSED),this.emit("pause")},onAutoplayRejected:function(){this.emit("autoplayrejected")},onAutoplayNotPossible:function(){this.emit("autoplaynotpossible")},onForceMuted:function(){this.emit("forcemuted")},onExitFullScreen:function(){this.exitFullScreen()},onEnded:function(){this._playingEmitted=!1,this._hasToBeRepeated()?this._doRepeat():this._doEnd()},getContainerDimensions:function(){var e;return this.isFullScreen?{width:(e=this.dtCanFullscreen?this._wrapperEl:this._wrapperEl.parentNode).clientWidth,height:e.clientHeight}:{width:this.width,height:this.height}},redraw:function(){var e="fit"!==this._opts.fitting,t=this._aspectRatio,i=this.getContainerDimensions(),n=CeltraPlayerUtils.fitComponent(100*t,100,i.width,i.height,e);switch(this.anchoringPoint){case"top":n.marginVertical=0;break;case"bottom":n.marginVertical=Math.ceil(i.height-n.height)}this._opts.videoElement||(this._wrapperEl.style.background=this._opts.barColor);function s(e){e.width=n.width+"px",e.height=n.height+"px",e.minHeight=n.height+"px",e.left=n.marginHorizontal+"px",e.top=n.marginVertical+"px"}e?(s(this._engineContainerEl.style),s(this._posterEl.style),(t=this._controlsWrapperEl.style).width=i.width+"px",t.height=i.height+"px",t.minHeight=i.height+"px",t.left=0,t.top=0):(s(this._engineContainerEl.style),s(this._posterEl.style),s(this._controlsWrapperEl.style))},onSeeking:function(){this.emit("seeking")},onSeeked:function(e){if(this._seeked){switch(this._seeked=!1,this._stateBeforeSeek){case CeltraPlayerUtils.PLAYING:this.play();break;case CeltraPlayerUtils.PAUSED:this.silentPause()}this._stateBeforeSeek=void 0}this.emit("seeked")},onError:function(){this.emit("error")},onCanUnMute:function(){this.emit("canunmute")},onCustomInfo:function(e){this.emit("custominfo",e)}}),extend(t.prototype,{getState:function(){return this._state},mute:function(){this._videoEngine&&"function"==typeof this._videoEngine.mute&&this._videoEngine.mute(),this.onMuted()},unMute:function(){this._videoEngine&&"function"==typeof this._videoEngine.unMute&&this._videoEngine.unMute(),this.onUnMuted()},silentPlay:function(){this._videoEngine.play()},createSpecs:function(e,t){e=this._videoEngineSpecProvider(e,t),e=merge(e,{options:this._opts}),this._opts.videoStream&&this._opts.videoStream.useRaw&&(e.videoUrl=(creative.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"blobs/"+this._opts.videoStream.blobHash),t=AudioEngineProvider.createAudioEngineSpec(e);return{videoEngineSpec:e,videoSources:e.videoUrl?[CeltraPlayerUtils.createSourceObject(e.videoUrl,null)]:VideoEngineProvider.createVideoSourceObjects(e,this._opts.videoStream),audioEngineSpec:t,audioSources:t?AudioEngineProvider.createAudioSourceObjects(this._opts.videoStream):null}},initialize:function(e){this._createEngines(e),CeltraPlayerUtils.isNode(this._engineEl)&&!this._engineEl.parentNode&&this._engineContainerEl.appendChild(this._engineEl),e.videoEngineSpec.options.videoElement&&(this._wrapperEl.style.background="transparent"),CeltraPlayerUtils.attachHandlers(this,this._videoEngine,n),void 0!==e.videoEngineSpec.startMuted&&(e.videoEngineSpec.startMuted?this.mute():this.unMute()),this._initialized=!0},play:function(e){null==this._videoEngine?Logger("VideoPlayer").log("Video not initialized!"):(this.isState(CeltraPlayerUtils.UNSTARTED,CeltraPlayerUtils.ENDED)&&this.changeState(CeltraPlayerUtils.BUFFERING),this._firstPlay&&!e&&this.unMute(),this._firstPlay=!1,this._videoEngine.play(),this.emit("userplayed"))},_createEngines:function(e){var t;null===this._videoEngine&&(this._engineType=e.videoEngineSpec.engineType,this._videoPresets=e.videoEngineSpec.presets,"JsVideoEngine"==e.videoEngineSpec.clazz?this._videoEngine=new JsVideoEngine(e.videoSources[0].url,this._engineType,e.videoEngineSpec):"Html5VideoEngine"==e.videoEngineSpec.clazz&&(this._videoEngine=Html5VideoEngine(e.videoSources,e.videoEngineSpec)),null!==e.audioEngineSpec&&(t=null,"WebAudioEngine"==e.audioEngineSpec.clazz?(t=WebAudioEngine(e.audioSources[0].url,e.audioEngineSpec.preload),Object.create(AVSyncWebAudio).init(this,t,e.videoEngineSpec.startMuted)):"Html5AudioEngine"==e.audioEngineSpec.clazz&&(t=Html5AudioEngine(e.audioSources,e.audioEngineSpec.preload),Object.create(AVSyncAudio).init(this,t,e.videoEngineSpec.startMuted))),this._engineEl=this._videoEngine.render(this._doc,{playsInline:this.playsInline()}))},silentPause:function(){this._videoEngine.pause()},pause:function(){this._videoEngine&&this._videoEngine.pause(),this.emit("userpaused"),this._playingEmitted=!1},close:function(){this.playsInline()?this.exitFullScreen():this.emit("close")},replay:function(){this.emit("replayed"),this.setCurrentTime(0),this._playingEmitted=!1,this.play()},reset:function(){this._videoEngine.pause(),this._videoEngine.reset(),this._posterShow(),this._controlsController&&this._controlsController.reset(),this._timeUpdateCounter=0,this._playingEmitted=!1},enterFullScreen:function(){if(this._videoEngine){if(this._containerElzIndex=this._containerEl.style.zIndex,this.dtCanFullscreen){var e=this._wrapperEl;(e.requestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen).bind(e)()}else{this.isFullScreen=!0;var t=this._wrapperEl;for(this.isState(CeltraPlayerUtils.PAUSED);t&&!t.getAttribute("class").includes("celtra-base-creative-unit");)t=t.parentNode;t.insertBefore(this._wrapperEl,t.firstChild),this._wrapperEl.style.zIndex=CeltraPlayerUtils.ZINDEX_MAX,this.redraw(),this.silentPauseActive=!0,defer(function(){this.silentPauseActive=!1}.bind(this),500),this._initialized&&this._videoEngine.pause()}this._initialized&&this._videoEngine.play(),this.emit("enterfullscreen")}},exitFullScreen:function(){var e;this.dtCanFullscreen?((e=document).exitFullscreen||e.webkitExitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen).bind(e)():(this.isFullScreen=!1,this.isState(CeltraPlayerUtils.PAUSED,CeltraPlayerUtils.ENDED),this._wrapperEl.style.zIndex="",this._containerEl.style.zIndex=this._containerElzIndex,this._containerEl.appendChild(this._wrapperEl),this.silentPauseActive=!0,defer(function(){this.silentPauseActive=!1}.bind(this),500),this.once("pause",CeltraPlayerUtils.validFor(function(){this.play(),this._muted||defer(this.unMute.bind(this),100)}.bind(this),500))),this.redraw(),this.emit("exitfullscreen")},hide:function(){this._wrapperEl&&(this._wrapperEl.style.display="none")},show:function(){this._wrapperEl&&(this._wrapperEl.style.display="")},destroy:function(){this._videoEngine&&(this._videoEngine.pause(),this._videoEngine.destroy(),this._controlsController&&this._controlsController.destroy());var e=function(){CeltraPlayerUtils&&this._wrapperEl&&CeltraPlayerUtils.removeElements(this._wrapperEl),this._toggleDesktopFSStateHandlers("remove"),this._wrapperEl=null}.bind(this);"undefined"!=typeof TouchEventSimulator?defer(e,100):e(),this.emit("destroy")},getDuration:function(){return this.duration},getCurrentTime:function(){return this._videoEngine?this._videoEngine.getCurrentTime():null},setCurrentTime:function(e){this._videoEngine&&this._videoEngine.setCurrentTime(e)},seekTo:function(e){this.emit("seekto",e),this._seeked||(this._stateBeforeSeek=this.getState(),this.getState()===CeltraPlayerUtils.PLAYING&&this.pause()),this._seeked=!0,this._videoEngine.seekToRatio(e)}}),t.prototype._hasToBeRepeated=function(){return this._repeated',' ','
','
','
','
','
','
","
",' ",""],extend(o.prototype,{render:function(t,n){var e,i=n.isMasterVideo?[]:["play","replay"];return this._container||(e={},CeltraPlayerUtils.createDom(t,o.TEMPLATE,{desktop:windows("10")?"video-controls-desktop ie-click-event":desktop()?"video-controls-desktop":""},this._getWrapper(e)),this._container=e.wrapper,n.isMasterVideo&&this.hide("outOfPlaySet"),this._container.querySelector("[data-bind=progressBar]").style.backgroundColor=n.progressbarColour,this._container.querySelector("[data-bind=timeBar]").style.backgroundColor=n.progressbarColour,(t="undefined"!=typeof creative?creative:window.creative)&&(e="MRAIDAdapter"===t.adapter.constructor.name,"crop"===n.fitting&&e&&(this._container.querySelector("[data-bind=exitFullScreen]").style.top="50px")),i.forEach(function(t){var e,i;n[t]&&(e=n[t],i=this._getElements(t)[0],removeClass(i,"center-button"),addClass(i,"custom-button"),i.innerHTML='')}.bind(this)),this._container.addEventListener("tap",this.onTapHandler)),this._container},show:function(){CeltraPlayerUtils.show.apply(null,this._getElements.apply(this,arguments))},hide:function(){CeltraPlayerUtils.hide.apply(null,this._getElements.apply(this,arguments))},showCursor:function(t){CeltraPlayerUtils.showCursor([t])},hideCursor:function(t){CeltraPlayerUtils.hideCursor([t])},setProgressBarWidth:function(t){t=Math.min(t,1),this._container&&this._container.querySelector("[data-bind=progressBar]")&&(this._container.querySelector("[data-bind=progressBar]").style.width=100*t+"%")},setTimeBarWidth:function(t){t=Math.min(t,1),this._container&&this._container.querySelector("[data-bind=timeBar]")&&(this._container.querySelector("[data-bind=timeBar]").style.width=100*t+"%")},hideAndShowWrapper:function(){this.hide("wrapper"),defer(function(){this.show("wrapper")}.bind(this))},disableMuteUnmuteControls:function(){this._getElements("mute")[0].innerHTML="",this._getElements("unMute")[0].innerHTML=""},pendingStateOn:function(t){addClass(this._getElements(t)[0],"video-controls-pending")},pendingStateOff:function(t){this._container&&removeClass(this._getElements(t)[0],"video-controls-pending")},addClass:function(t,e){t=this._getElements(t)[0];t&&addClass(t,e)},removeClass:function(t,e){t=this._getElements(t)[0];t&&removeClass(t,e)},orientationChange:function(t){t()},onTapHandler:function(t){t.stopPropagation();t=t.target.getAttribute("data-bind");t&&this._userInteractionHandler(t)},setDTMouseMoveHandler:function(e){e.addEventListener("mousemove",function(t){t.stopPropagation();t=t.target,t=t!==e?t.getAttribute("data-bind"):"vidWrapper";this.hasMouseMoved?this.hasMouseMoved=!1:"wrapper"!==t&&"vidWrapper"!==t||this._userInteractionHandler(t,!0)}.bind(this))},_getWrapper:function(i){return function(t){var e=t.getAttribute("data-bind");e&&(i[e]=t)}},_getElements:function(){if(this._container){for(var t,e=[],i=0;i','','Powered by Celtra
','",""],s.prototype.render=function(t,i){return this._container||(this.elements={},CeltraPlayerUtils.createDom(t,s.TEMPLATE,{desktop:celtra.windows("10")?"video-controls-desktop ie-click-event":celtra.desktop()?"video-controls-desktop":""},this._getWrapper(this.elements)),this._container=this.elements.wrapper,i.enableVerticalVideoUIOffset&&addClass(this._container,"vertical-UI-offset"),i.radarBoxToEdge&&(addClass(this.elements.inner_top_left_box,"align_to_left"),addClass(this.elements.top_left_box,"disable")),i.soundBoxToEdge&&(addClass(this.elements.inner_bottom_right_box,"align_to_right"),addClass(this.elements.bottom_right_box,"disable")),"dark"===i.uiTheme&&addClass(this._container,"dark-theme"),["custom_play","custom_replay"].forEach(function(t){var s,e;i.customIcons&&i.customIcons[t]&&(s=i.customIcons[t],e=this._getElements(t)[0],addClass(e,"custom-button"),e.innerHTML='')}.bind(this)),this._container.addEventListener("tap",this.onTapHandler)),this._container},s.prototype.setRadarInitialLongitude=function(t){this.elements.radar_longitude.style.transform="translate3d(-50%, -50%, 0) rotate("+(90+t)+"deg)"},s.prototype.setRadarOrientation=function(t){this.elements.radar_orientation.style.transform="translate3d(-50%, -50%, 0) rotate("+t+"deg)"},s.prototype._removeAnimationClasses=function(){removeClass(this.elements.play,"hide"),removeClass(this.elements.spinner,"hide")},s.prototype.switchToInFullscreenMode=function(){this._removeAnimationClasses(),removeClass(this.elements.topright_arrow,"toprightANIMA"),removeClass(this.elements.botleft_arrow,"botleftANIMA"),addClass(this.elements.topright_arrow,"toprightANIMAout"),addClass(this.elements.botleft_arrow,"botleftANIMAout")},s.prototype.switchToInlineMode=function(){this._removeAnimationClasses(),removeClass(this.elements.topright_arrow,"toprightANIMAout"),removeClass(this.elements.botleft_arrow,"botleftANIMAout"),addClass(this.elements.topright_arrow,"toprightANIMA"),addClass(this.elements.botleft_arrow,"botleftANIMA")},s.prototype.showMuteButton=function(){removeClass(this.elements.mute_icon,"switch_on"),removeClass(this.elements.mute_icon,"switch_off"),removeClass(this.elements.unmute_icon,"switch_on"),removeClass(this.elements.unmute_icon,"switch_off"),addClass(this.elements.mute_icon,"switch_on"),addClass(this.elements.unmute_icon,"switch_off")},s.prototype.showUnmuteButton=function(){removeClass(this.elements.mute_icon,"switch_on"),removeClass(this.elements.mute_icon,"switch_off"),removeClass(this.elements.unmute_icon,"switch_on"),removeClass(this.elements.unmute_icon,"switch_off"),addClass(this.elements.mute_icon,"switch_off"),addClass(this.elements.unmute_icon,"switch_on")},s.prototype.startCountdown=function(t,s){this._countdown||(this._countdown=CountdownProvider.create(!0,this.elements.countdown,t,"countdown",{countdownType:"normal",bgCircleColor:"dark"===s?"rgba(255,255,255,1)":"rgba(0,0,0,.4)",barColor:"dark"===s?"rgba(0,0,0,.4)":"rgba(255,255,255,1)"}),this._countdown.show())},s.prototype.updateCountdown=function(t){this._countdown&&this._countdown.setCurrentTime(t)},s.prototype.show=function(){for(var t,s=this._getElements.apply(this,arguments),e=0;e=this.fileLength-1||0=t.fileLength-1?this.emit("loadend"):this.load()):this.emit("error",e.status)},i.prototype._getContentRangeParts=function(e){return this.corsLengthHack?(contentLength=e.getResponseHeader("Content-Type").split(";")[1],{receivedFrom:this.from,receivedTo:this.to,fileLength:parseInt(contentLength,10)}):(e=e.getResponseHeader("Content-Range"),e=/(\d+)-(\d+)\/(\d+)$/.exec(e),{receivedFrom:parseInt(e[1],10),receivedTo:parseInt(e[2],10),fileLength:parseInt(e[3],10)})},i.prototype.destroy=function(){clearTimeout(this._requestByteHandle),this._xhr&&this._xhr.abort(),this._xhr=null},window.NetStream=i}();;
!function(){function t(t,e){this._opts=e||{},this.buffer={writePos:0,bytes:null},this.fileLength=0,this.receivedTo=0,this.doneBuffering=!1,this.onLoad=this.onLoad.bind(this),t&&(t.on("data",this.onLoad),t.on("loadend",function(){this._opts.onLoadend&&this._opts.onLoadend(),this.doneBuffering=!0,this.emit("loadend")}.bind(this)))}extend(t.prototype,EventEmitter),t.prototype.onLoad=function(t){var e;this.fileLength=t.fileLength,this.receivedTo=t.receivedTo,this.buffer.bytes||(e=new Uint8Array(t.fileLength),this.buffer.bytes=e.subarray(0),this.buffer.writePos=0),this.buffer.bytes.set(t.data,this.buffer.writePos),this.buffer.writePos+=t.data.byteLength,this.emit("data",t)},t.prototype.getAllData=function(){0=this._buffer.duration?clearInterval(this._emitTimeUpdateInterval):this._emitTimeUpdateInterval=setInterval(this.emit.bind(this,"timeupdate"),250)},_decodeAudioData:function(){o.decodeAudioData(this._encodedBuffer,function(e){this._buffer=e,this._loadStatus="loaded",this.emit("canplay"),this.emit("canplaythrough")}.bind(this))}}),Object.defineProperties(s,{paused:{get:function(){return this._paused}},ended:{get:function(){return!1}},ready:{get:function(){return"loaded"===this._loadStatus}},playedBefore:{get:function(){return i}},currentTime:{get:function(){return this._paused?this._pausedAt:o.currentTime-this._timeDiff},set:function(e){this._pausedAt=e,"loaded"!==this._loadStatus||this._paused||(this.pause(),this.playAudio(e))}}}),e.WebAudioEngine=function(e,t,i){return Object.create(s).init(e,t,!!i)}}(this);;
!function(){this.Html5AudioEngine=function(e,t){var n,o,r;return"undefined"==typeof Audio?null:((n=new Audio).isUnlocked=!1,t?(n.preload="auto",CeltraPlayerUtils.setMediaElementSource(document,n,e),n.start=noop):(n.preload="none",n.start=function(){CeltraPlayerUtils.setMediaElementSource(document,n,e),n.start=noop}),n.ready=!1,r=function(){.3=e)&&(this._lastTriggeredTime=e),t)},_observeCuePoints:function(){this._video._player&&this._video.fireTriggers("videoCuepoint",this._observe)},attach:function(){this._attached||(this._attached=!0,Ticker.frame(this._observeCuePoints,"update"))},detach:function(){this._attached&&(this._attached=!1,Ticker.removeFrame(this._observeCuePoints,"update"))},start:function(){this.attach()},stop:function(t){this.detach(),t&&(this._lastTriggeredTime=this._VIDEO_START_TIME)}};;
!function(t){var r={name:"Countdown",init:function(t,e,i,s){if(this._duration=e,this._displayTime=null,this._mode=i,this._opts=s||{},this._countdownType=s.countdownType,-1===["kinetic","countdown"].indexOf(this._mode))throw this._mode+" is not available as a mode for Countdown component!";"kinetic"===this._mode&&(this._duration=.95*this._duration);e="undefined"==typeof InstaAdUtility?celtra.isHighDensityDisplay():InstaAdUtility.isHighDensityDisplay,i=celtra.desktop()&&!e,s=celtra.desktop()&&e,e=celtra.desktop()&&celtra.gecko();switch(this._retinaFactor=i?1:s||e?2:4,this._countdownType){case"small":this._fontSize=0,this._size=26*this._retinaFactor,this._barWidth=2*this._retinaFactor;break;case"normal":this._fontSize=13*this._retinaFactor,this._size=32*this._retinaFactor,this._barWidth=2*this._retinaFactor;break;case"big":this._fontSize=14*this._retinaFactor,this._size=40*this._retinaFactor,this._barWidth=2.5*this._retinaFactor}return this._halfSize=this._size/2,this._barColor=this._opts.barColor||"rgba(255, 255, 255, 1)",this._bgCircleColor=this._opts.bgCircleColor||"rgba(0, 0, 0, 0.08)",this._circ=2*Math.PI,this._quart=Math.PI/2,this._radius=.5*this._size,this._radiusCountdown=.5*(this._size-4*this._barWidth),this._barPercentage=0,this._kineticBarSpeed=.01,this._introTransitionEnabled=this._opts.introTransitionEnabled||!1,this._opacity=null,this.node=t.appendChild(this._createCountdown()),this._offscreenCanvas=document.createElement("canvas"),this._offscreenContext=this._offscreenCanvas.getContext("2d"),this._state=new StateObject({show:null}),this._time=new StateObject({currentTime:0}),this._update=this._update.bind(this),this._render=this._render.bind(this),Ticker.frame(this._update,"update"),Ticker.frame(this._render,"render"),this.setCurrentTime(0),this},destroy:function(){Ticker.removeFrame(this._update,"update"),Ticker.removeFrame(this._render,"render"),this._offscreenCanvas=null,this._offscreenContext=null,this._prebufferedBg=null},_createCountdown:function(){var t=document.createElement("div"),e=document.createElement("canvas"),i=document.createElement("div"),e=(this._text=document.createElement("div"),this._ctx=e.getContext("2d"),addClass(t,"celtra-countdown"),this._opts.cssClass&&addClass(t,this._opts.cssClass),"kinetic"===this._mode&&addClass(t,"quick-transition"),addClass(e,"celtra-countdown-canvas"),addClass(i,"celtra-countdown-text-wrapper"),i.style.fontSize=this._fontSize+"px",e.setAttribute("width",this._size+"px"),e.setAttribute("height",this._size+"px"),t.appendChild(e),i.style.color=this._barColor,i.style.width=this._size+"px",i.style.height=this._size+"px","scale("+1/this._retinaFactor+")");return t.style.transform=e,t.style.webkitTransform=e,t.appendChild(i),i.appendChild(this._text),t},show:function(){this._state.show=!0},hide:function(){this._state.show=!1},_update:function(){var t,e;this._barPercentage=this._time.currentTime/this._duration,this._state.show&&this._time.isDirty()&&(this._time.markClean(),this._offscreenContext.clearRect(0,0,this._size,this._size),this._prebufferedBg||(this._offscreenContext.beginPath(),this._offscreenContext.arc(this._halfSize,this._halfSize,this._radius,0,this._circ),this._offscreenContext.fillStyle=this._bgCircleColor,this._offscreenContext.fill(),this._offscreenContext.beginPath(),this._offscreenContext.strokeStyle=this._barColor,this._offscreenContext.lineCap="square",this._offscreenContext.closePath(),this._offscreenContext.fill(),this._offscreenContext.lineWidth=this._barWidth,this._prebufferedBg=this._offscreenContext.getImageData(0,0,this._size,this._size)),t=-this._quart,e=this._circ*(1-this._barPercentage)-this._quart,0===this._barPercentage?e=t=0:1<=this._barPercentage&&(t=0,e=2*Math.PI),this._offscreenContext.putImageData(this._prebufferedBg,0,0),this._offscreenContext.beginPath(),t!==e&&this._offscreenContext.arc(this._halfSize,this._halfSize,this._radiusCountdown,t,e,!0),this._offscreenContext.stroke())},_render:function(){var t;this._introTransitionEnabled&&this._opacity&&this._state.show&&(this.node.style.opacity=this._opacity+.2),this._state.isDirty()&&(this._state.show?(removeClass(this.node,"celtra-hide"),this._introTransitionEnabled||addClass(this.node,"celtra-show")):(this._introTransitionEnabled&&this._opacity&&(this.node.style.opacity=0,this._introTransitionEnabled=!1),removeClass(this.node,"celtra-show"),addClass(this.node,"celtra-hide")),this._state.markClean()),this._state.show&&(this._ctx.clearRect(0,0,this._size,this._size),this._ctx.drawImage(this._offscreenCanvas,0,0),"countdown"===this._mode&&(t=Math.round(this._time.currentTime/1e3),this._displayTime!==t&&(this._displayTime=t,this._text.innerText=this._displayTime)))},setOpacity:function(t){this._opacity=t},setCurrentTime:function(t){if("countdown"===this._mode){if(t=this._duration-t,this._duration<=0)return;this._time.currentTime=t=t<150?0:t}"kinetic"===this._mode&&(this._time.currentTime=t)}};t.CountdownProvider={create:function(t,e,i,s,n){return t?Object.create(r).init(e,i,s,n):{show:noop,hide:noop,setCurrentTime:noop,destroy:noop}}}}(this);;
function Creative(e,t,r,n,i,a,o,s,u,c,d,m,p){if(e instanceof Creative)throw"This JSON has already been unfreezed. We do it inline, to improve performance. Duplicate it yourself before unfreezing, if you need to use it again.";var f=p.start("Creative.new"),s=extend({adapter:a,runtimeParams:t||{},urlOpenedOverrideUrls:s,urlOpenedUrlAppendage:d,clickThroughDestinationUrl:m,storeOpenedOverrideUrls:u,macros:c},o),d=p.start("Creative.unfreeze");return e=Freezer.unfreeze(e,window,s),d.end(),e.instantiation=randInt(),e.batcher=new Batcher({protoLoading:a.protoLoading}),e.trackingCenter=r,e.universalInteractionId="",e.aggregatorTracking=n,e.experiments=i,e.perf=p,e.platformAdvId=t.platformAdvId,e.platformAdvIdTrackingLimited=t.platformAdvIdTrackingLimited,null!=a&&(a.openBrowserSameWindowInHostileIFrame=function(e){window.top.location.href=e}),f.end(),e}Creative.toString=function(){return"[Clazz Creative]"},Creative.prototype.toString=function(){return"[Creative "+this.name+"]"},window.creative=null,extend(Creative.prototype,EventEmitter),Creative.init=function(e,t,r,n,i,a,o,s,u,c,d,m,p){if(window.creative)throw"creative is a singleton and was already initialized.";Logger.initFromRuntimeParams(t),window.creative=new Creative(e,t,r,n,i,a,o,s,u,c,d,m,p)},Creative.prototype.userInteracted=function(e){this.emit("interaction",e)},Creative.prototype.clickedThrough=function(e){this.emit("clickThrough",e)},Creative.prototype._getRuntimeParamsWithPrefix=function(e){var t,r={};for(t in this.runtimeParams)0===t.indexOf(e)&&(r[t.slice(e.length)]=this.runtimeParams[t]);return r},Object.defineProperties(Creative.prototype,{sessionId:{enumerable:!0,get:function(){return this.runtimeParams.sessionId}},placementId:{enumerable:!0,get:function(){return this.runtimeParams.placementId||null}},folderId:{enumerable:!0,get:function(){return this.runtimeParams.folderId}},supplierId:{enumerable:!0,get:function(){return this.runtimeParams.supplierId||null}},secure:{enumerable:!0,get:function(){return 1==this.runtimeParams.secure}},userParams:{enumerable:!0,get:function(){return this._getRuntimeParamsWithPrefix("user.")}},userIdentifiers:{enumerable:!0,get:function(){return this.runtimeParams.userIdentifiers}},authTokenUrlParam:{enumerable:!1,get:function(){return"authBasis="+creative.runtimeParams.authBasis+"&authToken="+creative.runtimeParams.authToken}},customAudiences:{enumerable:!0,get:function(){return function(t){if(creative.runtimeParams.customAudiences[t])return{userExists:creative.runtimeParams.customAudiences[t].userExists,userData:creative.runtimeParams.customAudiences[t].userData,addUser:function(e){return CustomAudiences.addUser(t,e)},removeUser:function(){return CustomAudiences.removeUser(t)}};throw new Error('Custom audience "'+t+'" is not used by the creative.')}}},acceptLanguage:{enumerable:!0,get:function(){return this.runtimeParams.acceptLanguage}}}),Creative.prototype.awake=function(){function o(e,t,r,n){e.forEach(function(e){e.parentUnit=n,e.parentScreen=r,e.parentContainer=t})}for(var e in this.units){var t=this.units[e],r=(t.name=e,[]);t.variants?t.variants.forEach(function(e){r=r.concat(e.master,e.screens),e.loadingScreen&&(r=[e.loadingScreen].concat(r))}):(r=[t.master].concat(t.screens),t.loadingScreen&&(r=[t.loadingScreen].concat(r))),r.forEach(function(e){e.parentUnit=t,function r(e,n,i,a){e.forEach(function(t){t.parentUnit=a,t.parentScreen=i,t.parentContainer=n,t.getNestedContainers().forEach(function(e){e.parentUnit=a,e.parentScreen=i,e.parentObject=t,r(e.objects,e,i,a),e.scenes&&o(e.scenes,e,i,a)})})}(e.objects,e,e,t),e.scenes&&o(e.scenes,e,e,t)})}},Creative.prototype.track=function(e,t){0<=["firstInteraction","interaction","endCardInteraction","unitCollapsed","creativeDismissed","clickThroughDestinationOpened","firstClickThrough","itemSwiped"].indexOf(e.name)&&(e=extend(e,{universalInteractionId:this.universalInteractionId})),this.trackingCenter.track(e,t)},Creative.prototype.setUniversalInteractionId=function(e){this.universalInteractionId=e},Creative.prototype.wrapRedirectPageUrl=function(e,t){return this.trackingCenter.wrapRedirectPageUrl(e,t)},Object.defineProperty(Creative.prototype,"sdk",{get:function(){return this.adapter},enumerable:!0}),Creative._throw=function(e){throw e},Creative.prototype.getUserInteracted=function(){return 1==this.runtimeParams.userInteracted},Creative.prototype.trackCreativeRendered=function(){creative.adapter.notifycreativeRendered(),this._getCreativeRendered()||(this.track({name:"creativeRendered"}),this.runtimeParams.creativeRendered=1,defer(this.trackingCenter.batchFlush))},Creative.prototype._getCreativeRendered=function(){return 1===this.runtimeParams.creativeRendered},Creative.prototype.trackCreativeRenderedOnScreenShow=Creative.prototype.trackCreativeRendered,Creative.prototype.trackCreativeRenderedOnVideoStart=noop,Creative.trackCustomEventAction=function(e,t,r){e.track({name:"custom",label:t.name}),creative.adapter.sendToEventMonitor("custom",t.triggerId,e.screen.name,null,t.name,e.initiatedBeforeScreenShown()),r&&r()},Creative.prototype.trackCreativeLoaded=function(e){this.track({name:"creativeLoaded",viewability00Measurable:e.observingViewability("00"),viewability501Measurable:e.observingViewability("501"),viewableTimeMeasurable:e.observingViewableTime(),cdnVariant:this.runtimeParams.variantChoices.CdnTiming||"none"}),defer(this.trackingCenter.batchFlush),this.perf._stopTrackingDefers=!0,this.perf.mark("creativeLoaded")},Creative.prototype.createUserLocation=function(e){if("undefined"!=typeof UserLocation)return new UserLocation({lat:this.runtimeParams.gpsLat,lng:this.runtimeParams.gpsLng},e)},Creative.prototype.getPageUrl=function(e){return(this.secure?this.creativeUrl:this.insecureCreativeUrl)+e+"?base64json="+encodeURIComponent(btoa(to_utf8(JSON.stringify(this.runtimeParams))))},Creative.prototype.shouldClickThroughToNewWindow=function(e){var t=0<=["same","new"].indexOf(this.runtimeParams.preferredClickThroughWindow)?this.runtimeParams.preferredClickThroughWindow:"new",e=(creative&&creative.adapter.nesting.hostileIframe&&(t="new"),e&&e.inUserInitiatedIteration),r=deviceInfo.os.android()&&deviceInfo.browser.facebookApp();return"new"==t&&e&&!r},Creative.prototype.getFeedFields=function(){return FeedData.getCustomFields()},Creative.prototype.getFeedFieldByName=function(e){return FeedData.getCustomFieldByName(e)},Creative.prototype.getAllFeedFieldsByName=function(t){return FeedData.getCustomFields().filter(function(e){return e.name===t})};;
function Banner(){}inherit(Banner,Creative),Banner.toString=function(){return"[Clazz Banner]"},Banner.prototype.toString=function(){return"[Banner "+this.name+"]"},Banner.prototype.awake=function(){Banner.uber.awake.apply(this,arguments),this.adapter.wrapRedirectPageUrl=this.wrapRedirectPageUrl.bind(this),this.units.banner.dismissAction=function(n,e,t){n.track({name:"creativeDismissed"}),creative.adapter.dismiss(t,e)}.bind(this),this.units.banner.trackCreativeDismissed=function(){new ActionContext(this.visibleScreen).track({name:"creativeDismissed"})},this.units.banner.userLocation=this.createUserLocation(!1)};;
var Kernel={toString:function(){return"[Clazz Kernel]"},runInParallelAction:function(t,e,n){e.actions.waitForEach(function(e,n){e(t,n)},n)}};Kernel.runInParallelActionDryRun=Kernel.runInParallelAction,Kernel.runInBackgroundAction=function(e,n,t){n.action&&n.action(e,noop),t()},Kernel.runInSequenceAction=function(t,e,n){for(var r=n,i=e.actions.length-1;0<=i;i--)r=function(e,n){return function(){n(t,e)}}(r,e.actions[i]);r()},Kernel.runInSequenceActionDryRun=Kernel.runInSequenceAction,Kernel.runNTimesAction=function(e,n,t){n.caller.hasOwnProperty("executionsLeft")||(n.caller.executionsLeft=n.repeat),0=n.startKeyframe,s=e<=n.endKeyframe||!n.firstFrameAnimated,r=this._lastUpdateObjectsProgress>n.startKeyframe&&en.endKeyframe,r=this._isReactiveScene&&(r||o);if(a&&s||this.fallbackFrameShown||r)n.firstFrameAnimated=!0,hasClass(i.node,"animated")||addClass(i.node,"animated");else{if(!hasClass(i.node,"animated"))continue;removeClass(i.node,"animated")}}o=this._keyframeAnimations[i.localId].animation.getValuesAt(e);Scene._updateLayoutWithValues(i.layoutCurrent,o,this._objectVisibilityStates[t]),i._keyframeStyle=this._calculateKeyframeStyleAttributes(i)}}this._lastUpdateObjectsProgress=e},Scene.prototype.renderObjects=function(){for(var e in this._claimedObjects){var t=this._claimedObjects[e];t.node&&((e=this._objectVisibilityStates[e]).isDirty("transition")&&("show"===e.transition?t.showAction(null,{},noop):"hide"===e.transition&&t.hideAction(null,{},noop),e.markClean("transition")),t._applyStyles(t.node,t._keyframeStyle),t.redrawSceneLayout())}},Scene.prototype.getPlayer=function(){return this._player},Scene.prototype.claimObject=function(e){if(-1===this._claimedObjects.indexOf(e)){for(var t=0;ti&&(t.sortIndex+=2e3),t.minSize.height>n&&(t.sortIndex+=2e3),t.sortIndex+=Math.abs(t.minSize.width-i)+Math.abs(t.minSize.height-n)}),t.sort(function(t,e){return t.sortIndex-e.sortIndex}),this.layoutCurrentIndex=this.layouts.indexOf(t[0]),o!=this.layoutCurrentIndex&&this.emit("layoutChanged")},CreativeUnit.prototype.enterRenderTree=function(){var t;this._isRendering||(this._isRendering=!0,t=this.getAvailableSize(),this.updateWindowMetrics(this._getOrientation(),t.width,t.height),this.master&&(this.master.loaded?defer(this.master.enterRenderTree.bind(this.master),void 0,void 0,useAsap()):this.once("_firstScreenLoaded",this.master.enterRenderTree.bind(this.master))),this.visibleScreen&&defer(this.visibleScreen.enterRenderTree.bind(this.visibleScreen),void 0,void 0,useAsap()),this.hacks.triggerBlurWhenTappingOutsideOfInputs&&(attach(this.node,"touchstart",function(t){-1==["INPUT","TEXTAREA","SELECT"].indexOf(t.target.nodeName)&&null!=this.lastInputElementFocused&&this.lastInputElementFocused.blur()}.bind(this),!0),attach(this.node,"focus",function(t){-1<["INPUT","TEXTAREA","SELECT"].indexOf(t.target.nodeName)&&(this.lastInputElementFocused=t.target)}.bind(this),!0),attach(this.node,"blur",function(t){-1<["INPUT","TEXTAREA","SELECT"].indexOf(t.target.nodeName)&&(this.lastInputElementFocused=null)}.bind(this),!0)))},CreativeUnit.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.master&&this.master.exitRenderTree(),this.visibleScreen&&this.visibleScreen.exitRenderTree())},CreativeUnit.prototype._appear=function(){this.loaded||Creative._throw("Cannot show the unit before it has finished loading."),this.isAppearing&&Creative._throw("The unit is already appearing."),this.node.parentNode||Creative._throw("Creative unit must be added to DOM before show() is called. Animations will start on show()."),Logger("unit").log("Showing "+this),this.inView&&(this.inView.start(),this.currentScreen&&this.currentScreen.inView&&this.currentScreen.inView.start()),this.hasAppearedAtLeastOnce||(this.placeboBar&&this.placeboBar.start(),this.orientationLockIsOn?this._emitUnitFirstShownAfterOrientationPrompt=!0:this.emit("_unitFirstShown"))},CreativeUnit.prototype._disappear=function(){this.isAppearing||Creative._throw("The unit is not appearing, can not disappear."),Logger("unit").log("Hiding "+this),this.inView&&this.inView.stop()},CreativeUnit.prototype.createNode=function(){var i,n,t=this.unitDiv=CreativeUnit.uber.createNode.call(this),e=(t.id="celtra-"+this.name.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}),Color.isGradient(this.backgroundColor)?addCssRule("#"+t.id,Color.createGradientStyle(this.backgroundColor)):t.style.backgroundColor=this.backgroundColor,t.style.overflow=this.master.showOverflow?"visible":"hidden",this.screenContainer=document.createElement("div"),this.screenContainer.className="celtra-screen-container",this.screenContainer.style.position="absolute",t.appendChild(this.screenContainer),this.screenHolder=document.createElement("div"),this.screenHolder.className="celtra-screen-holder",this.screenHolder.style.width="100%",this.screenHolder.style.height="100%",this.screenContainer.appendChild(this.screenHolder),this.borderColor&&0=e.duration,t.shakeTimeout=setTimeout(function(){delete t.shakeStartTime,t.triggered=!1},500),e&&!t.triggered&&(t.triggered=i=!0),i)}.bind(this),null,e))},Screen.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.emit("enteredRenderTree"))},Screen.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.emit("exitedRenderTree"))},Screen.prototype._updateSize=function(){this.emit("resize")},Screen.prototype.finishedLoading=function(){Screen.uber.finishedLoading.call(this),Logger("unit").log("Finished loading "+this)},Screen.prototype.triggerBeforeAppear=function(e){var t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&!this.appearedAtLeastOnce&&(this.isFirstScreen()||this.isMasterScreen())});this.fireTriggers("beforeAppear",null,e,t)},Screen.prototype.triggerOrientationChange=function(e){this.fireTriggers("orientationChange",null,e)},Screen.prototype.getMaxZIndex=function(){var t=0;return this.objects.forEach(function(e){e.zIndex>t&&(t=e.zIndex)}),t},Screen.prototype.inViewTriggerSetup=function(){var t=!1,i=creative&&creative.adapter&&creative.adapter.adBehavior.subpixelScrollable;this.triggers.forEach(function(e){i&&"enterView"===e.type&&e.parameters&&100==e.parameters.area&&(e.parameters.area=99.9),"enterView"!==e.type&&"leaveView"!==e.type||(t=!0,this.inViewAreaRatio=0)},this),t&&this.inView.on("areaInViewRatioChanged",this.triggerInView.bind(this))},Screen.prototype.triggerInView=function(e){var t=new ActionContext(this),i="enterView",n=this.inViewAreaRatio,r=e,a=function(e,t){return e.parameters.area-t.parameters.area};e=t.length;return t&&a.ifNotClosing("swipe",n,n.trackUserInteraction),t},null,n)}})),attach(i,"transitionend",function(t){t.stopPropagation()},!1),this.disableComponentRedrawOnEvent||this.parentContainer.on("resize",this._refreshDisplayState),this.parentContainer.on("enteredRenderTree",function(){this.hidden||this.enterRenderTree()}.bind(this)),this.parentContainer.on("exitedRenderTree",function(){this.hidden||this.exitRenderTree()}.bind(this)),this.layoutPrevious=this.layoutCurrent,this.disableComponentRedrawOnEvent||this.parentUnit.on("layoutChanged",this.handleLayoutChanged.bind(this)),this.initClickPrevention(function(){return this.node}.bind(this)),this._applyStyles(i,this._calculateNewStyleAttributes()),this.positionUsingTransforms()||deviceInfo.browser.safari("9.0.0",null)||(i.style.outline="1px solid transparent"),this._rxListeners=[],i},ScreenObject.prototype.positionUsingTransforms=retFalse,ScreenObject.prototype.sizeUsingTransforms=retFalse,ScreenObject.prototype.isValid=retTrue,ScreenObject.prototype.getNaturalSize=function(){return this.originalSize},ScreenObject.prototype._scaleNaturalSize=function(t,e){return t},ScreenObject.prototype._calculateNewStyleAttributes=function(){var t={transform:"",transformOrigin:"50% 50%"},e=this._scaleNaturalSize(this.getNaturalSize(),this.size),i=this.position.x,n=this.position.y;return this.sizeUsingTransforms()&&(i+=ScreenObject._roundIfNeeded((this.size.width-e.width)/2),n+=ScreenObject._roundIfNeeded((this.size.height-e.height)/2)),this.positionUsingTransforms()?(t.left="0",t.top="0",(i||n)&&(t.transform+=ScreenObject.getCSSTranslate(i,n))):(t.left=i+"px",t.top=n+"px"),!this.isAnimated&&0==this.rotation||(t.transform+=" rotate("+this.rotation+"deg) "),this.sizeUsingTransforms()?(t.width=e.width+"px",t.height=e.height+"px",i=this.size.width/e.width,n=this.size.height/e.height,t.transform+=" scale("+i+", "+n+")"):(t.width=this.size.width+"px",t.height=this.size.height+"px"),t.zIndex=this.zIndex,t.opacity=this.opacity,this.hidden?t.display="none":t.display="block",t},ScreenObject.prototype._applyStyles=function(e,i){i&&Object.keys(i).forEach(function(t){celtra.styler.css(e,t,i[t])})},ScreenObject.prototype._refreshDisplayState=function(){if(this.node){var t,e=this._calculateNewStyleAttributes(),i=!1;for(t in e){var n=String(e[t]).replace(/^\s*|\s*$/g,""),r=celtra.styler.css(this.node,t);celtra.styler.css(this.node,t)!==n&&r!=n&&"zIndex"!=t&&"display"!=t&&(i=!0)}return this._applyStyles(this.node,e),this.redrawLayout(),i}},ScreenObject.prototype.finishAnimation=function(){this.node&&void 0!==celtra.styler.css(this.node,"transitionDuration")&&(celtra.styler.css(this.node,"transitionDuration","1ms"),this.node.offsetWidth,celtra.styler.css(this.node,"transitionDuration",""))},ScreenObject.prototype.handleLayoutChanged=function(){var t=function(){this.layoutPrevious.hidden&&!this.layoutCurrent.hidden?this.enterRenderTreeAndAppear(!0):!this.layoutPrevious.hidden&&this.layoutCurrent.hidden&&this.parentContainer._isRendering&&this.exitRenderTree(),this.layoutPrevious=this.layoutCurrent}.bind(this);ios()?defer(t):t(),this.finishAnimation(),this._refreshDisplayState()},ScreenObject.prototype.redrawLayout=function(){},ScreenObject.prototype.redrawSceneLayout=function(){this.redrawLayout()},ScreenObject.prototype._checkAndEnhanceParamsForFileLoading=function(t,e,i){t=ScreenObject.uber._checkAndEnhanceParamsForFileLoading.call(this,t,e,i);return t.settings.creativeUnitVariantId=this.parentScreen.parentContainer.localId,t},ScreenObject.prototype._preloadImage=function(t,e,i){e=this._checkAndEnhanceParamsForFileLoading(t,e,i);ScreenObject.uber._preloadImage.call(this,t,e.settings,e.callback)},ScreenObject.prototype._loadImage=function(t,e,i){e=this._checkAndEnhanceParamsForFileLoading(t,e,i);ScreenObject.uber._loadImage.call(this,t,e.settings,e.callback)},ScreenObject.prototype.setPosition=function(t,e){this.position={left:t+"px",top:e+"px"},this._refreshDisplayState()},ScreenObject.prototype.getPosition=function(){return{x:this.position.x,y:this.position.y}},ScreenObject.prototype.setSize=function(t,e){this.size.width=t,this.size.height=e,this._refreshDisplayState()},ScreenObject.prototype.getSize=function(){return{width:this.size.width,height:this.size.height}},ScreenObject.prototype.setOpacity=function(t){this.opacity=t,this._refreshDisplayState()},ScreenObject.prototype.getOpacity=function(){return this.opacity},ScreenObject.prototype.animateAction=function(t,e,i){i=i||noop,this.isAnimated=!0;var n=void 0!==e.duration?e.duration:1e3,r=e.timingFunction||"linear";function o(t){return!isNaN(parseFloat(t))&&isFinite(t)}function s(t){var e={position:{},size:{width:null,height:null},zIndex:null,opacity:null,rotation:null};return deep(e,t),e}function a(t,e){var i=e.size,n=t.size,r=(null==i.width&&(i.width=n.width),null==i.height&&(i.height=n.height),t.size=i,t.position),o=e.position,s=null,a=null,c=null,h=null;["left","right","hcenter"].forEach(function(t){t in r&&(s=t),t in o&&(c=t)}),["bottom","top","vcenter"].forEach(function(t){t in r&&(a=t),t in o&&(h=t)}),c&&null!==o[c]&&(delete r[s],r[c]=o[c]),h&&null!==o[h]&&(delete r[a],r[h]=o[h]),null!=e.rotation&&(t.rotation=e.rotation),null!=e.opacity&&(t.opacity=e.opacity),null!=e.zIndex&&(t.zIndex=e.zIndex)}e.layoutSpecificValues?e.layoutSpecificValues.forEach(function(t,e){this.layoutSpecificValues[e]&&a(this.layoutSpecificValues[e],s(t))}.bind(this)):(null!=(e=s(e.properties)).position.x&&(e.position.left=e.position.x+"px"),null!=e.position.y&&(e.position.top=e.position.y+"px"),null!=e.zIndex&&(e.zIndex=e.zIndex+ScreenObject._zIndexOffset,this.zIndex=e.zIndex),null!=e.size.width&&o(e.size.width)&&(e.size.width+="px"),null!=e.size.height&&o(e.size.height)&&(e.size.height+="px"),a(this.layoutCurrent,e));var c,h,u,l=this.node,e=(celtra.styler.css(l,"transition",""),celtra.styler.css(l,"transitionProperty","all"),celtra.styler.css(l,"transitionDuration",n+"ms"),celtra.styler.css(l,"transitionTimingFunction",r),this._refreshDisplayState());function p(){flash(),Date.now()<%= rules[i].selector %> { <%= rules[i].attributes %> }\n<% } %>"),ScreenObject.prototype.css=function(e,i){void 0===i&&(i=e,e=this.getNode()),Object.keys(i).forEach(function(t){celtra.styler.css(e,t,i[t])})},ScreenObject.prototype.getNestedContainers=function(){return[]},ScreenObject.prototype.getActiveContainers=function(){return this.getNestedContainers()};;
function Hotspot(){}inherit(Hotspot,ScreenObject),Hotspot.toString=function(){return"[Clazz Hotspot]"},Hotspot.prototype.toString=function(){return"[Hotspot "+this.localId+"]"},Hotspot.prototype.createNode=function(){var t=Hotspot.uber.createNode.call(this);return addClass(t,"touchable"),attach(t,"tap",this.handleTap),t},Hotspot.prototype.handleTap=function(t){t.stopPropagation()};;
var composeUrl=CeltraPlayerUtils.composeUrl,isTruthy=CeltraPlayerUtils.isTruthy,getUrl=CeltraPlayerUtils.getUrl,ifDefined=CeltraPlayerUtils.ifDefined,minVideoSize={width:50,height:50};function Video(){}inherit(Video,ScreenObject),Video.toString=function(){return"[Clazz Video]"},Video.prototype.toString=function(){return"[Video "+this.localId+"]"},Video.prototype.transcodingGroup="inline",Video.TRANSCODING_IN_PROGRESS="We’re processing this video. After a few moments, please refresh your browser.",Video.TRANSCODING_ERROR="Transcoding failed. Try uploading a different video or contact support.",Video.AUTOPLAY_REJECTED="Please enable Allow All Auto-Play in your Safari Preferences to preview this creative.",Video.SIZE_PROPERTY_STEP_MULTIPLIER=100,Video.prototype.awake=function(){Video.uber.awake.call(this),this._player=null,this._spec=null,this.posterImageSource=null,this.posterDisabled=!1,this._externalEngineProvided=null,this._customUrlParameters={},this._inViewAreaRatio=0,this._delayVideoAutoplay=!0,this._fallbackToMPEG1=!1,this._viewabilityStartTriggerRatio=.05,this._viewabilityPauseTriggerRatio=.05,this.isTeaser="teaser"===this.purpose,this.fullscreenMode=this.fullscreenButton?"both":"disabled",this.isConsideredInView=!1,this.isUserEngaged=!1,this._handleAreaInViewRatioChanged=this._handleAreaInViewRatioChanged.bind(this),this._handleContainerViewableChange=this._handleContainerViewableChange.bind(this),this._handleSkinViewportChangeTimeout=null,this._handleAreaCoveredOrAreaInViewRatioChanged=this._handleAreaCoveredOrAreaInViewRatioChanged.bind(this),this._handleAreaCoveredOrAreaInViewRatioChangedThrottled=this._handleAreaCoveredOrAreaInViewRatioChangedThrottled.bind(this),this._handleStopRequest=this._handleStopRequest.bind(this),this._originalVideo=this.video},Video.prototype.redrawLayout=function(){this._player&&this._player.setDimensions(this._round(this.size.width),this._round(this.size.height))},Video.prototype.createNode=function(){"string"==typeof this.posterImageFeedFieldKey&&FeedData.checkAndTrackValue(this.posterImageFeedFieldKey,this.posterImageFeedRowIndex,this.constructor.name,"posterImageFeedFieldKey"),"string"==typeof this.videoSourceFeedFieldKey&&(FeedData.checkAndTrackValue(this.videoSourceFeedFieldKey,this.videoSourceFeedRowIndex,this.constructor.name,"videoSourceFeedFieldKey"),this.video=null,FeedData.isCorrectFieldType(this.videoSourceFeedFieldKey,this.constructor.name,"videoSourceFeedFieldKey")&&(i=FeedData.getFieldRowByKey(this.videoSourceFeedFieldKey,this.videoSourceFeedRowIndex))&&"string"==typeof i.value&&(this.video=new File,this.video.blobHash=i.value,this.video.meta=i.metadata&&i.metadata.video?i.metadata.video:{hasAudio:!0}));var e,t,i=Video.uber.createNode.call(this);return this._isSnapchatFormat=!!creative.constructor.name.match(/^Snapchat.*/),this._isDesktop=deviceInfo.deviceType.desktop()&&"Desktop"===creative.intendedDeviceType,this.posterDisabled=this.posterDisabled||isTruthy(creative.runtimeParams.disablePoster),this._isSnapchatFormat&&(this.transcodingGroup="snapchat"),this._initializeCustomStartStopRatios(),this.on("enteredRenderTree",function(){this._createPlayer()}.bind(this)),this.on("exitedRenderTree",this._exitedRenderTree.bind(this)),this.video&&!this.isTeaser&&this._hasPosterImage()&&!this.posterDisabled&&(e={crossOrigin:"anonymous"},"responsive"!=this.parentUnit.sizing||this._isSnapchatFormat?(t=this._getPosterUrl())&&this._preloadImage(new File(t),e,function(e){this.posterImageSource=e}.bind(this)):this.parentScreen.on("appeared",function(){this._loadImage(new File(this._getPosterUrl(),e))}.bind(this))),addClass(i,"touchable"),attach(i,"tap",this.handleTap),creative.adapter.on("stateChange",function(e){this._player&&("dismissed"==e&&this.emit("ended"),"default"==e&&this.isTeaser&&this.playAction(new ActionContext(this,!1)))}.bind(this)),creative.adapter.on("orientationchange",function(e){this._player&&this._player.redraw(),setTimeout(function(){this._player&&this._player.redraw()}.bind(this),800)}.bind(this)),creative.adapter.on("resize",function(){this._player&&this._player.redraw()}.bind(this)),i},Object.defineProperty(Video.prototype,"isTrackable",{get:function(){return!0}}),Video.prototype._leaveView=function(){var e=this._player&&this._player.isState(CeltraPlayerUtils.PLAYING),t=this._player&&this._player.isState(CeltraPlayerUtils.BUFFERING);this.playWhenInView=e||t||this.playWhenInView,(e||t)&&this._player.pause()},Video.prototype._comeInView=function(){this._player&&this.playWhenInView&&(this._player.play(),this.playWhenInView=!1)},Video.prototype._initializeCustomStartStopRatios=function(){var e=parseFloat(creative.runtimeParams.viewabilityStartTriggerRatio),t=parseFloat(creative.runtimeParams.viewabilityPauseTriggerRatio),i=parseFloat(this.viewabilityStartTriggerRatio)/100,a=parseFloat(this.viewabilityPauseTriggerRatio)/100,n=null,s=null;0<=e&&e<=1&&0<=t&&t<=1?(n=e,s=t):0<=i&&i<=1&&0<=a&&a<=1&&(n=i,s=a),n&&n<=1&&0<=n&&(this._viewabilityStartTriggerRatio=n=.95<=n?.95:n),s&&s<=1&&0<=s&&(this._viewabilityPauseTriggerRatio=s=.95<=s?.95:s)},Video.prototype._getVideoControlsController=function(e){var a,n;return this.isTeaser||e.campaignExplorer&&!e.massProductionPreview?null:(a=isTruthy(creative.runtimeParams.enableVerticalVideoUIOffset),n=function(e){return new VideoControls(e)},function(e,t){var i="never"===this.controlsMode,e=new VideoControlsController(e,n,extend({autohideTime:"hide"===this.controlsMode?3:0,showPlayIconAsFallback:!0,playIconEnabled:!this.autoplay,hasTapTriggers:this.hasTriggers("tap"),tapCallback:function(){var e=new ActionContext(this,!0);this.ifNotClosing("tap",e,e.trackUserInteraction),this.fireTriggers("tap",null,null,e)}.bind(this),loaderIconEnabled:void 0===this.loader||this.loader,countdownIconEnabled:this.countdown&&!i,resumeIconEnabled:void 0===this.resumeButton||this.resumeButton,replayIconEnabled:!0,fullscreenIconEnabled:"both"===this.fullscreenMode&&!i,soundIconEnabled:this.video.meta.hasAudio&&!i,customIcons:{custom_play:this.playIcon||null,custom_replay:this.replayIcon||null},vignetteEnabled:!1,celtraSignatureEnabled:!1,introAnimationEnabled:!1,radarIconEnabled:!1,enableVerticalVideoUIOffset:a},t));return e.on("playButtonPressed",function(){this.playAction(new ActionContext(this,{consideredUserInitiatedByBrowser:!0}))}.bind(this)),e}.bind(this))},Video.prototype._showFullscreenButton=function(){return deviceInfo.deviceType.desktop()||ifDefined(this.parentUnit.fillsContainer,!1)},Video.prototype._getPosterUrl=function(){var e,t,i;return"string"==typeof this.posterImageFeedFieldKey?"string"==typeof(i=FeedData.getFieldValueByKey(this.posterImageFeedFieldKey,this.posterImageFeedRowIndex))&&FeedData.isCorrectFieldType(this.posterImageFeedFieldKey,this.constructor.name,"posterImageFeedFieldKey")?i:null:this.posterImage?this.posterImage.getUrl():this.posterImageSource&&!this.video.useRaw?this.posterImageSource.src:this.video&&this.video.blobHash?(i={width:this.size.width,height:this.size.height},e=1=minVideoSize.width?i:minVideoSize).width),null!==i.height&&(i.height=(i.height>=minVideoSize.height?i:minVideoSize).height),composeUrl(getUrl("cachedApi"),"videoThumb/",this.video.blobHash,{position:ifDefined(this.posterImageGenerateAt,null),transform:"crush",resize:i.width+"x"+i.height,quality:"90",colorAccurate:"true"})):null},Video.prototype._createWarningMessage=function(){var e,t=function(e){var i=e.getContext("2d"),t=["#ffffff","#ffff00","#00ffff","#00ff00","#ff00ff","#ff0000","#0000ff"],a=t.slice().reverse(),n=(e.height=this.size.height,e.width=this.size.width,Math.ceil(.5*this.size.height)),s=Math.ceil(.5*this.size.height),r=Math.ceil(this.size.width/t.length);t.forEach(function(e,t){i.fillStyle=e,i.fillRect(r*t,0,r,n)}),a.forEach(function(e,t){i.fillStyle=e,i.fillRect(r*t,n,r,s)}),i.fillStyle="rgba(0,0,0,0.6)",i.fillRect(0,0,this.size.width,this.size.height)}.bind(this);this._overlay||(this._overlay=document.createElement("div"),this._overlay.style.display="none",this._overlay.className="warning-wrapper",(e=document.createElement("canvas")).className="warning-canvas",t(e),this._overlay.appendChild(e),(t=document.createElement("div")).className="warning-message-container",this._warningTriangle=document.createElement("div"),this._warningTriangle.className="warning-triangle",this._warningHourglass=document.createElement("div"),this._warningHourglass.className="warning-hourglass",this._warningMessage=document.createElement("div"),this._warningMessage.className="warning-message",t.appendChild(this._warningTriangle),t.appendChild(this._warningHourglass),t.appendChild(this._warningMessage),this._overlay.appendChild(t),this.node.appendChild(this._overlay))},Video.prototype.showWarningMessage=function(e){this._transcodingMsgShown||(this._transcodingMsgShown=!0,this._createWarningMessage(),removeClass(this._warningHourglass,"show"),removeClass(this._warningTriangle,"show"),"TRANSCODING_IN_PROGRESS"===e?(this._overlay.style.display="block",this._warningMessage.innerText=Video.TRANSCODING_IN_PROGRESS,addClass(this._warningHourglass,"show")):"TRANSCODING_ERROR"===e?(this._overlay.style.display="block",this._warningMessage.innerText=Video.TRANSCODING_ERROR,addClass(this._warningTriangle,"show")):"AUTOPLAY_REJECTED"===e&&(this._overlay.style.display="block",this._warningMessage.innerText=Video.AUTOPLAY_REJECTED,addClass(this._warningTriangle,"show")))},Video.prototype._getNewStreamPresets=function(){return["x265_served_480p","x265_served_1080p","vp9_served_480p","vp9_served_720p"]},Video.prototype._isVideoTranscoding=function(){var e;this._isRendering&&!this.video.useRaw&&(e=composeUrl(creative.secure?creative.apiUrl:creative.insecureApiUrl,"videoStream/status/",this.video.blobHash),loadJSONP(e,function(e){var t=!1,i=!1,a=function(){this._player.pause(),this._player.hide()}.bind(this),n=e[this.transcodingGroup];isDefAndNotNull(n)&&(i=n.hasTranscodingError,t=this.canUseNewVideoStreams?this._getNewStreamPresets().every(function(e){return isDefAndNotNull(n[e+"BlobHash"])}):n.isFullyTranscoded),i?(a(),this.showWarningMessage("TRANSCODING_ERROR")):t||(a(),this.showWarningMessage("TRANSCODING_IN_PROGRESS"))}.bind(this)))},Video.prototype._appear=function(){creative.adapter.canMeasureViewportPlacementGeometry?(this._inViewAreaRatio=this.parentUnit.inView.areaInViewRatio,this.isConsideredInView=!0,this._skinPageContentElement=creative.adapter.skinGetters&&creative.adapter.skinGetters.getPageContentElement(),this._skinPageContentElement?(this._inViewAreaRatio=Math.min(this._inViewAreaRatio,this._getAreaNotCoveredByContentRatio()),this._clearSkinViewportChangeTimeout(),creative.adapter.on("viewportChange",this._handleAreaCoveredOrAreaInViewRatioChangedThrottled),this.parentUnit.inView.on("areaInViewRatioChanged",this._handleAreaCoveredOrAreaInViewRatioChanged)):this.parentUnit.inView.on("areaInViewRatioChanged",this._handleAreaInViewRatioChanged),this._inViewAreaRatio>=this._viewabilityStartTriggerRatio&&(this._delayVideoAutoplay=!1)):creative.adapter.canMeasureContainerAreaInViewRatio?(this._inViewAreaRatio=creative.adapter.getContainerInViewAreaRatio(),this.isConsideredInView=!0,this._inViewAreaRatio>=this._viewabilityStartTriggerRatio&&(this._delayVideoAutoplay=!1),creative.adapter.on("containerAreaInViewRatioChanged",this._handleAreaInViewRatioChanged)):creative.adapter.containerViewabilityObserver&&(this.isConsideredInView=creative.adapter.containerViewabilityObserver.isViewable,this.isConsideredInView&&(this._delayVideoAutoplay=!1),creative.adapter.on("containerViewableChange",this._handleContainerViewableChange)),this.video&&(this.autoplay||this.isTeaser)&&!this._delayVideoAutoplay&&(this.playAction(new ActionContext(this,!1)),this.isTeaser&&this.on("enteredRenderTree",function(){defer(this.playAction(new ActionContext(this,!1)))}.bind(this)))},Video.prototype._getAreaNotCoveredByContentRatio=function(){var e=0,t=CRect.adopt(this.getNode().getBoundingClientRect()),i=CRect.adopt(this._skinPageContentElement.getBoundingClientRect()),i=t.intersect(i),t=t.area;return e=0=e&&e<=this._viewabilityPauseTriggerRatio?(this.isConsideredInView=!1,this._leaveView()):this._inViewAreaRatio=this._viewabilityStartTriggerRatio&&(this.isConsideredInView=!0,this._playActionCalled?this._comeInView():this.video&&this.autoplay&&this.playAction(new ActionContext(this,!1)),this.playWhenInView=!1),this._inViewAreaRatio=e},Video.prototype._handleContainerViewableChange=function(e){this.isConsideredInView!==e&&((this.isConsideredInView=e)?this._comeInView():this._leaveView())},Video.prototype._videoEngineOptionsProvider=function(){return{hasAudio:this.video.meta.hasAudio,isTeaser:this.isTeaser,fallbackToMPEG1:this._fallbackToMPEG1,forceMPEG1Video:isTruthy(creative.runtimeParams.forceMPEG1Video),forceMPEG4Video:isTruthy(creative.runtimeParams.forceMPEG4Video),campaignExplorer:isTruthy(creative.runtimeParams.campaignExplorer),massProductionPreview:isTruthy(creative.runtimeParams.massProductionPreview),thumbnailMode:"thumb"===creative.runtimeParams.purpose,isSnapchatFormat:this._isSnapchatFormat,hqQuality:!!this.hqQuality,transcodingGroup:this.transcodingGroup,skipCodecs:this._getSkippedCodecs()}},Video.prototype._getSkippedCodecs=function(){var e=this.canUseNewVideoStreams?[]:["vp9","h265"];return e=creative.runtimeParams.skipCodecs?e.concat(String(decodeURIComponent(creative.runtimeParams.skipCodecs)).split(",").map(function(e){return e.toLowerCase()})):e},Video.prototype._getVideoOptions=function(){return{preload:this.preload||this.isTeaser||this.video.useRaw,pauseOnEnd:this.pauseOnEnd,playsInline:!0,componentName:this.name,canShowSpinner:!this.isTeaser,fullscreenMode:this._showFullscreenButton()?this.fullscreenMode:"disabled",repeatTimes:this.indefinitely||this.loop?2147483647:this.repeatTimes,closeFSOnEnd:this.closeOnEnd,fitting:this.fitting,barColor:"fit"===this.fitting&&this.barColor?this.barColor:"#000000",videoWidth:this.video.meta.width,videoHeight:this.video.meta.height,anchoringPoint:this.parentUnit.anchoringPoint,duration:parseFloat(this.video.meta.duration),hasAudio:this.video.meta.hasAudio,startMuted:this.muted,videoStream:{blobHash:this.video.blobHash,useRaw:this.video.useRaw,from:this.isTeaser?0:null,to:this.isTeaser?5:null,customUrlParameters:this._customUrlParameters},isDesktop:this._isDesktop}},Video.prototype.showEmptyVideoPlaceholder=function(){this.barColor&&(this.getNode().style.background=this.barColor),CeltraPlayerUtils.insertStyleTag("celtra-video-player-style",VideoPlayerCss,this.getNode().ownerDocument),addClass(this.getNode(),"video-player-wrapper-empty")},Video.prototype._createPlayer=function(){if(!this._player)if(this.video){creative.adapter.checkVideoTranscodeStatus&&this._isVideoTranscoding();var i=this._videoEngineOptionsProvider(),a=(this._externalEngineProvided=!!i.videoElement,merge(this._getVideoOptions(),{videoElement:i.videoElement})),e=(this.posterDisabled?a.poster=null:this._hasPosterImage()&&(a.poster=this._getPosterUrl()),function(e,t){return VideoEngineProvider.createVideoEngineSpec(e,extend(i,{startMuted:t,preload:a.preload}))}.bind(this)),t=function(){return this.isUserEngaged&&creative.adapter.viewabilityMeasurable.viewable00&&this.isConsideredInView}.bind(this);if(this._player=new VideoPlayer(this.getNode(),e,this._getVideoControlsController(i),t,a),!this.isTeaser&&"MasterVideo"!==this.constructor.name)for(var n in this._player=QuartileEventsEmitter(this._player),this._player.QUARTILE_EVENTS)this._player.on(n,function(e){this.emit(e.name,e)}.bind(this));this._player.setDimensions(this._round(this.size.width),this._round(this.size.height)),this._attachListeners(),this._orientationLockHandler=CeltraPlayerUtils.orientationLockHandler.bind(null,this._player),this.parentUnit.addListener("orientationLockChanged",this._orientationLockHandler)}else"string"!=typeof this.videoSourceFeedFieldKey&&this.showEmptyVideoPlaceholder()},Video.prototype._attachListeners=function(){var e;this._player&&(e=function(){this._cuePointObserver||(this._cuePointObserver=Object.create(CuePointObserver).init(this)),defer(this._cuePointObserver.start)}.bind(this),this._player.on("muted",function(){this._videoContext&&this._videoContext.track({name:"videoMuted"}),this.fireTriggers("videoMute"),this.emit("muted")}.bind(this)),this._player.on("unmuted",function(){this._videoContext&&this._videoContext.track({name:"videoUnmuted"}),this.fireTriggers("videoUnMute"),this.emit("unmuted")}.bind(this)),this._player.on("volumechange",function(e){this.emit("volumechange",e)}.bind(this)),this._player.on("play",function(){e(),this.emit("play")}.bind(this)),this._player.on("playing",function(){e(),this.fireTriggers("videoPlaying"),this.emit("playing")}.bind(this)),this._player.on("enterfullscreen",function(){this.fireTriggers("videoEnterFullScreen"),this.emit("enterfullscreen")}.bind(this)),this._player.on("custominfo",function(e){new ActionContext(this,!1).track(e)}.bind(this)),this._player.on("exitfullscreen",function(){this.fireTriggers("videoExitFullScreen"),this.emit("exitfullscreen")}.bind(this)),this._player.on("autoplayrejected",function(){this.emit("autoplayrejected")}.bind(this)),this._player.on("autoplaynotpossible",function(){this.fallbackToImageSequence&&(this._fallbackToMPEG1=!0,this.resetAction(),this.playAction(new ActionContext(this,!1)))}.bind(this)),this._player.on("ended",function(){this._cuePointObserver&&this._cuePointObserver.stop(!0),this.fireTriggers("videoComplete"),this.emit("ended")}.bind(this)),this._player.on("pause",function(){this._cuePointObserver&&this._cuePointObserver.stop(),this._videoContext&&this._videoContext.track({name:"videoPause"}),this._player&&!this._player.silentPauseActive&&this.fireTriggers("videoPause"),this._player&&this.emit("pause",this._player.getCurrentTime())}.bind(this)),this._player.on("repeat",function(){this._cuePointObserver&&this._cuePointObserver.stop(!0),this.fireTriggers("videoComplete"),this.emit("repeat")}.bind(this)),this._player.on("timeupdate",function(){var e;this._player&&(e=this._player.getCurrentTime(),(this._previousTime||0)!==e&&this.emit("timeupdate",e))}.bind(this)),this._player.on("durationchange",function(){this._player&&this.emit("durationchange",this._player.getDuration())}.bind(this)),this._player.on("userInteraction",function(e){void 0!==e&&void 0!==e.isUserEngaged&&(this.isUserEngaged=e.isUserEngaged)}.bind(this)),this._player.on("loadstart",function(){creative.adapter.manuallyAddResourceToResourceObserver&&this._player.activeSrc&&"MasterVideo"!==this.constructor.name&&creative.adapter.manuallyAddResourceToResourceObserver(this._player.activeSrc)}.bind(this)))},Video.prototype._getRealState=function(e,t,i){var a,t=e.videoEngineSpec.preload&&!deviceInfo.deviceType.desktop()?(a=!(!t&&i),i):(a=e.videoEngineSpec.startMuted,e.videoEngineSpec.inUserInitiatedThread);return{startMuted:a,inUserInitiatedThread:t}},Video.prototype._trackViewShown=function(e,t){e=this.appliedState?this.appliedState.inUserInitiatedThread:void 0,t=this.appliedState?this.appliedState.startMuted:void 0;if(!this.isTeaser){for(var i=this.parentScreen,a=this;a.parentContainer.parentObject;){if("undefined"!=typeof DynamicContent&&a.parentContainer.parentObject instanceof DynamicContent){i=a.parentContainer;break}a=a.parentContainer.parentObject}var n=i.getActionsExecutedOnAppear().contains("play",this.localId);new ActionContext(this,!1).track({name:"viewShown",viewName:this.name,clazz:this.constructor.name,filename:this.video&&this.video.name||null,label:this.name,source:this.video&&this.video.blobHash||null,sourceType:"File",userInitiated:void 0!==e?e:!n&&!this.autoplay,startMuted:void 0!==t?t:this.muted,videoPlayerMode:"inline",viewabilityStartTriggerRatio:this._viewabilityStartTriggerRatio,viewabilityPauseTriggerRatio:this._viewabilityPauseTriggerRatio,duration:this.getDuration()})}this._trackViewShown=noop},Video.prototype._emitVideoPlayAttempted=function(e,t,i,a){this._videoContext&&(this._videoContext.track(this._getVideoPlayAttemptedEvent(e,t,i,a)),this._player.activePreset?this._videoContext.track({name:"videoPresetSelected",videoPreset:this._player.activePreset}):this._player.once("loadstart",function(){this._videoContext.track({name:"videoPresetSelected",videoPreset:this._player.activePreset})}.bind(this))),this._emitVideoPlayAttempted=noop},Video.prototype._getVideoPlayAttemptedEvent=function(e,t,i,a){return{name:"videoPlayAttempted",filename:this.video.name,trackable:!0,userInitiated:e,autoReplay:!!this.loop,startMuted:t,videoPlayerMode:"inline",engineType:i}},Video.prototype._exitedRenderTree=function(e){this.parentUnit.inView&&(this._skinPageContentElement?(this._clearSkinViewportChangeTimeout(),this.parentUnit.inView.off("areaInViewRatioChanged",this._handleAreaCoveredOrAreaInViewRatioChanged),creative.adapter.off("viewportChange",this._handleAreaCoveredOrAreaInViewRatioChangedThrottled)):this.parentUnit.inView.off("areaInViewRatioChanged",this._handleAreaInViewRatioChanged)),creative.adapter.canMeasureContainerAreaInViewRatio&&creative.adapter.off("containerAreaInViewRatioChanged",this._handleAreaInViewRatioChanged),creative.adapter.containerViewabilityObserver&&creative.adapter.off("containerViewableChange",this._handleContainerViewableChange),this._destroyPlayer()},Video.prototype._destroyPlayer=function(){this._cuePointObserver&&(this._cuePointObserver.detach(),this._cuePointObserver=null),this._playActionCalled=!1,this._delayVideoAutoplay=!0,this._spec=null,this._player&&(this._player.destroy(),this._player=null,this.parentUnit.off("mediaStopRequested",this._handleStopRequest),this.parentUnit.removeListener("orientationLockChanged",this._orientationLockHandler),this._orientationLockHandler=null,this._videoContext=null,this._trackingEventsEmitter=null,this._trackingEventsRecorder=null),this._videoEventsAdapter&&(this._videoEventsAdapter&&this._videoEventsAdapter.destroy(),this._videoEventsAdapter=null)},Video.prototype._createVideoContext=function(e){this.isTeaser||!this._player||this._videoContext||(this._videoContext=new VideoContext(this,this.video,this.name),this._videoEventsAdapter=new VideoEventsAdapter(this._player),this._videoContext.registerSource(this._videoEventsAdapter),this._player.on("userInteraction",this._videoContext.trackUserInteraction.bind(this._videoContext)))},Video.prototype._round=function(e){return Math.round(e)},Video.prototype._hasPosterImage=function(){return"string"==typeof this.posterImageFeedFieldKey||this.posterImageGenerate||isDefAndNotNull(this.posterImage)},Video.prototype.handleTap=function(e){e.stopPropagation()},Video.prototype.positionUsingTransforms=retFalse,Video.prototype.sizeUsingTransforms=retFalse,Video.prototype.getNaturalSize=function(){return this.originalSize},Video.prototype.getDuration=function(){var e=NaN;try{e=parseFloat(this.video.meta.duration)}catch(e){}return isNaN(e)?this._player?this._player.duration:0:e},Video.prototype.getCurrentTime=function(){return this._player?this._player.getCurrentTime():0},Video.prototype.setCurrentTime=function(e){return this._player?this._player.setCurrentTime(e):0},Video.prototype.playAction=function(e,t,i){var a;this._player&&(e||(console.warn("Context object has to be passed when calling playAction."),e=new ActionContext(this,{consideredUserInitiatedByBrowser:!1})),this._createPlayer(),this._createVideoContext(e.inUserInitiatedIteration),this.isUserEngaged=e.inUserInitiatedIteration,creative.adapter._stopAllMedia("toPlayVideo"),a=t&&void 0!==t.startMuted?t.startMuted:this.muted,t&&"touchstart"===t.triggerId&&creative.adapter.muteSoundIfVideoStartedOnTouchStartEvent&&(a=!0),this._spec||(this._spec=this._player.createSpecs(e.inUserInitiatedIteration,a)),this._player.engineInitialized||this._player.initialize(this._spec),this.appliedState=this._getRealState(this._spec,a,e.inUserInitiatedIteration),this._player.play(this.appliedState.startMuted),this.appliedState.inUserInitiatedThread&&this._videoContext.trackUserInteraction(),this._emitVideoPlayAttempted(e.consideredUserInitiatedByBrowser,this.appliedState.startMuted,this._spec.videoEngineSpec.engineType,this._spec.videoEngineSpec.preset),this._playActionCalled=!0,this.parentUnit.off("mediaStopRequested",this._handleStopRequest),this.parentUnit.on("mediaStopRequested",this._handleStopRequest)),(i||noop)()},Video.prototype._handleStopRequest=function(e){"toPlayVideo"===e?(this._player.pause(),this.playWhenInView=!1):this._leaveView()},Video.prototype.pauseAction=function(e,t,i){this._player&&this._player.isState(CeltraPlayerUtils.PLAYING)&&this._player.pause(),(i||noop)()},Video.prototype.rewindAction=function(e,t,i){this._player&&this._player.replay(),(i||noop)()},Video.prototype.resetAction=function(e,t,i){this._destroyPlayer(),Video.uber.resetAction.call(this,e,t,function(){this._isRendering&&this._createPlayer(),this._emitVideoPlayAttempted=Video.prototype._emitVideoPlayAttempted.bind(this),i&&i()}.bind(this))},Video.prototype.muteAction=function(e,t,i){this._player&&this._player.mute(),this.muted=!0,(i||noop)()},Video.prototype.unMuteAction=function(e,t,i){this._player&&this._player.unMute(),this.muted=!1,(i||noop)()},Video.prototype.enterFullScreenAction=function(e,t,i){this._player&&this._player.enterFullScreen(),(i||noop)()},Video.prototype.exitFullScreenAction=function(e,t,i){this._player&&this._player.exitFullScreen(),(i||noop)()},Video.prototype.setCustomUrlParameter=function(e,t){this._customUrlParameters[e]=t};;
function Picture(){}inherit(Picture,ScreenObject),extend(Picture.prototype,FeedImageCreator),extend(Picture.prototype,StaticContentMixin),Picture.toString=function(){return"[Clazz Picture]"},Picture.prototype.toString=function(){return"[Picture "+this.localId+"]"},Picture.prototype.createNode=function(){"string"==typeof this.imageSourceFeedFieldKey&&(FeedData.checkAndTrackValue(this.imageSourceFeedFieldKey,this.imageSourceFeedRowIndex,this.constructor.name,"imageSourceFeedFieldKey"),this.file=this._createFeedImageFile("imageSource",this.imageSourceFeedRowIndex));var t=Picture.uber.createNode.call(this);return this.file===this.placeholderFile?"string"==typeof this.imageSourceFeedFieldKey||this._newFileWasSet||(addClass(t,"empty"),this._preloadImage(new File("runner/image-placeholder.png"),function(e,i){this._isSettingFileInProgress||(t.style.backgroundImage="url("+i+")")}.bind(this))):this.file&&this._preloadImage(this.file,{},function(e,i){this._newFileWasSet||this._handlePreloadedImage(t,e)}.bind(this)),t},Picture.prototype.awake=function(){Picture.uber.awake.call(this),this.placeholderFile=new File("runner/image-placeholder.png"),this.placeholderFile.meta={height:28,width:28},this.file||(this.file=this.placeholderFile),this._originalFile=this.file,this._newFileWasSet=!1},Picture.prototype._handlePreloadedImage=function(e,i){this.file.dynamic&&(this.file.meta={height:i.naturalHeight,width:i.naturalWidth});var t="",r="",s="no-repeat",a=(this.imagePosition&&(t=this.imagePosition.replace("-"," ")),this.sizeUsingTransforms()?this.getNaturalSize():this.size),n=this.fittingSize;switch(n="fitUpToOriginal"===this.fittingSize?a.width=this._scene.onEndRepeatCount||"reverse"===this._scene.onEnd&&this._scene.onEndReverseCount&&this._state.loopCount>=2*this._scene.onEndReverseCount||0===this._scene.getDuration().milliseconds}}),Object.defineProperty(TimeScenePlayer.prototype,"_newLoopStarted",{get:function(){return this._state.isDirty("loopCount")}}),TimeScenePlayer.prototype._update=function(e){var t=this._scene.getDuration().milliseconds,t=(this._startTime=this._startTime||e,this._lastUpdateTime&&(this._startTime-=this._lastUpdateTime,this._lastUpdateTime=null),this._elapsedTime=e-this._startTime,this._state.loopCount=Math.floor(0[\\\\s\\\\S]*?\",\"gi\");(e=(t=e).replace(r,\"\"))!==t;);return e.replace(/e.minDistanceForSwipe:\"x\"===e.validAxis&&(t=n>e.minDistanceForSwipe),{isHorizontal:r/g),o=\"var p = []; with(o) {\\n\",i=!1;r.forEach(function(e){i?\"=\"==e[0]?o+=\" p.push(\"+e.replace(/^=\\s*|\\s*$/g,\"\")+\");\\n\":o+=\" \"+e+\"\\n\":e&&(o+=\" p.push('\"+e.replace(/'/g,\"\\\\'\").split(/\\r?\\n/g).join(\"\\\\n');\\n p.push('\")+\"');\\n\"),i=!i}),o+='} return p.join(\"\");';try{n=new Function(\"o\",o)}catch(e){r=new Error(\"Cannot parse template! (see `template` property)\");throw r.template=o,r}}return t?n(t):n}function flash(){var e=document.createElement(\"div\");e.style.background=\"white\",e.style.opacity=.005,e.style.position=\"absolute\",e.style.top=0,e.style.left=0,e.style.width=\"100%\",e.style.height=\"100%\",e.style.zIndex=2147483647,document.body.appendChild(e),setTimeout(function(){e.parentNode.removeChild(e)},0)}function crc32(e){\"use strict\";for(var t=-1,n=0,r=[0,-227835133,-516198153,324072436,-946170081,904991772,648144872,-724933397,-1965467441,2024987596,1809983544,-1719030981,1296289744,-1087877933,-1401372889,1578318884,274646895,-499825556,-244992104,51262619,-675000208,632279923,922689671,-996891772,-1702387808,1760304291,2075979607,-1982370732,1562183871,-1351185476,-1138329528,1313733451,549293790,-757723683,-1048117719,871202090,-416867903,357341890,102525238,-193467851,-1436232175,1477399826,1264559846,-1187764763,1845379342,-1617575411,-1933233671,2125378298,820201905,-1031222606,-774358714,598981189,-143008082,85089709,373468761,-467063462,-1170599554,1213305469,1526817161,-1452612982,2107672161,-1882520222,-1667500394,1861252501,1098587580,-1290756417,-1606390453,1378610760,-2032039261,1955203488,1742404180,-1783531177,-878557837,969524848,714683780,-655182201,205050476,-28094097,-318528869,526918040,1361435347,-1555146288,-1340167644,1114974503,-1765847604,1691668175,2005155131,-2047885768,-604208612,697762079,986182379,-928222744,476452099,-301099520,-44210700,255256311,1640403810,-1817374623,-2130844779,1922457750,-1503918979,1412925310,1197962378,-1257441399,-350237779,427051182,170179418,-129025959,746937522,-554770511,-843174843,1070968646,1905808397,-2081171698,-1868356358,1657317369,-1241332974,1147748369,1463399397,-1521340186,-79622974,153784257,444234805,-401473738,1021025245,-827320098,-572462294,797665321,-2097792136,1889384571,1674398607,-1851340660,1164749927,-1224265884,-1537745776,1446797203,137323447,-96149324,-384560320,461344835,-810158936,1037989803,781091935,-588970148,-1834419177,1623424788,1939049696,-2114449437,1429367560,-1487280117,-1274471425,1180866812,410100952,-367384613,-112536529,186734380,-538233913,763408580,1053836080,-860110797,-1572096602,1344288421,1131464017,-1323612590,1708204729,-1749376582,-2065018290,1988219213,680717673,-621187478,-911630946,1002577565,-284657034,493091189,238226049,-61306494,-1307217207,1082061258,1395524158,-1589280451,1972364758,-2015074603,-1800104671,1725896226,952904198,-894981883,-638100751,731699698,-11092711,222117402,510512622,-335130899,-1014159676,837199303,582374963,-790768336,68661723,-159632680,-450051796,390545967,1230274059,-1153434360,-1469116676,1510247935,-1899042540,2091215383,1878366691,-1650582816,-741088853,565732008,854102364,-1065151905,340358836,-433916489,-177076669,119113024,1493875044,-1419691417,-1204696685,1247431312,-1634718085,1828433272,2141937292,-1916740209,-483350502,291187481,34330861,-262120466,615137029,-691946490,-980332558,939183345,1776939221,-1685949482,-1999470558,2058945313,-1368168502,1545135305,1330124605,-1121741762,-210866315,17165430,307568514,-532767615,888469610,-962626711,-707819363,665062302,2042050490,-1948470087,-1735637171,1793573966,-1104306011,1279665062,1595330642,-1384295599],n=0;n>>8^r[255&(t^e.charCodeAt(n))];return(-1^t)>>>0}function isArray(e){return\"[object Array]\"===Object.prototype.toString.call(e)}function isDefAndNotNull(e){return null!=e}function updateQueryStringParameter(e,t,n){t=encodeURIComponent(t),n=encodeURIComponent(n);var r=new RegExp(\"([?|&])\"+t+\"=.*?(&|$)\",\"i\");return separator=-1!==e.indexOf(\"?\")?\"&\":\"?\",e.match(r)?e.replace(r,\"$1\"+t+\"=\"+n+\"$2\"):e+separator+t+\"=\"+n}function fetchShortenedUrl(r,e,t){t=t||noop;var n,o=!1,i=fetchShortenedUrl.inProgress,a=fetchShortenedUrl.cache;function c(t,n){i[r].forEach(function(e){e[t](n)}),delete i[r]}\"http\"==!r.slice(0,4)?t():a[r]?defer(function(){e(a[r])},0,\"fetchShortenedUrl defer success callback\"):(i[r]||(i[r]=[],o=!0),i[r].push({success:e,error:t}),o&&(t=(creative.runtimeParams.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"shortenedUrls/\",o={url:r,fields:\"shortUrlKey\"},n={cbName:\"shortener_\"+btoa(to_utf8(r)).replace(/\\//g,\"$\").replace(/\\+/g,\"_\").replace(/=/g,\"\")},loadJSONP(t+\"?\"+buildQuery(o),n,function(e){e=creative.shareUrl+e.shortUrlKey;c(\"success\",a[r]=e)},function(){requestCreateShortenedUrl(r,c)})))}function requestCreateShortenedUrl(t,n){var e=(creative.runtimeParams.secure?creative.apiUrl:creative.insecureApiUrl)+\"shortenedUrls/\",r=fetchShortenedUrl.cache,o=new XMLHttpRequest;o.open(\"POST\",e),o.setRequestHeader(\"Content-Type\",\"application/json; charset=utf-8\"),o.onreadystatechange=function(){var e;4===o.readyState&&(201===o.status?(e=JSON.parse(o.responseText),e=creative.shareUrl+e.shortUrlKey,r[t]=e,n(\"success\",e)):n(\"error\"))},o.send(JSON.stringify({url:t}))}function isMediaPlaying(e){try{return 0=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom:t instanceof CRect?t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom:void 0},CRect.prototype.map=function(t,i){var e=i.width/t.width,o=i.height/t.height;return new CRect((this.left-t.left)*e+i.left,(this.top-t.top)*o+i.top,this.width*e,this.height*o)},CRect.prototype.equals=function(t){return t&&this.left==t.left&&this.top==t.top&&this.right==t.right&&this.bottom==t.bottom},CRect.prototype.toString=function(){return\"CRect: \"+JSON.stringify(this)};;\nfunction Logger(e){if(!(this instanceof Logger))return new Logger(e);e=e||\"\";var n=noop;(0<=Logger.enabledNames.indexOf(e)||0<=Logger.enabledNames.indexOf(\"all\"))&&(n=function(){var e=[].slice.apply(arguments);e.unshift(Logger._ts()+\" [\"+Logger.sessionId+(this.name?\" \"+this.name:\"\")+\"]\"),console.log.apply(console,e)}),this.name=e,this.log=n,this.warn=n,this.debug=n,this.error=n}Logger._ts=function(){var e=new Date;function n(e,n){for(e+=\"\";e.lengthn[t])return 1}return 0}return!(-1===s(e,r)||1===s(e,i))}t.prototype.android=function(){return\"Android\"===this.name&&h(this.version,arguments)},t.prototype.osx=function(){return\"OSX\"===this.name&&h(this.version,arguments)},t.prototype.ios=function(){return\"IOS\"===this.name&&h(this.version,arguments)},t.prototype.windows=function(){return\"Windows\"===this.name&&h(this.version,arguments)},t.prototype.windowsPhone=function(){return\"WindowsPhone\"===this.name&&h(this.version,arguments)},t.prototype.linux=function(){return\"Linux\"===this.name},r.prototype.safari=function(){return\"Safari\"===this.name&&h(this.version,arguments)},r.prototype.chrome=function(){return 0===this.name.indexOf(\"Chrom\")&&h(this.version,arguments)},r.prototype.ie=function(){return 0===this.name.indexOf(\"Internet Explorer\")&&h(this.version,arguments)},r.prototype.android=function(){return\"Android Browser\"===this.name&&h(this.version,arguments)},r.prototype.samsung=function(){return\"Samsung Browser\"===this.name&&h(this.version,arguments)},r.prototype.opera=function(){return 0===this.name.indexOf(\"Opera\")&&h(this.version,arguments)},r.prototype.silk=function(){return\"Amazon Silk\"===this.name&&h(this.version,arguments)},r.prototype.firefox=function(){return 0===this.name.indexOf(\"Firefox\")&&h(this.version,arguments)},r.prototype.edge=function(){return\"Edge\"===this.name&&h(this.version,arguments)},r.prototype.miui=function(){return\"MIUI Browser\"===this.name&&h(this.version,arguments)},r.prototype.webView=function(){var e,n,t=null;return\"iP\"===(o.navigator.platform||\"\").substr(0,2)?(e=-1!==(e=this.userAgent).indexOf(\"Safari\")&&-1!==e.indexOf(\"Version\"),n=!/constructor/i.test(o.HTMLElement),e&&!o.navigator.standalone?t=\"iOS Safari or Safari Controller\":(n||o.indexedDB)&&o.statusbar.visible?(o.webkit&&o.webkit.messageHandlers||n||o.indexedDB)&&(t=\"WKWebView\"):t=\"UIWebView\"):/^.*\\/\\d\\.\\d \\(.*wv\\).*/.test(this.userAgent)&&(t=\"AndroidWebView\"),t},r.prototype.facebookApp=function(){var e=this.userAgent;return-1t[n])return 1}return 0}return!(-1===a(e,i)||1===a(e,r))}}(window);;\n!function(n){var e=n.navigator.userAgent,r=function(){var e=n;try{for(;void 0!==e.parent.location.href&&e.parent.document!==e.document;)e=e.parent}catch(e){}return e}(),t=/rv:.*Gecko\\//.test(e),i=/MSIE|Trident\\//.test(e),o=/WebKit/.test(e),a=/^-?([mM]oz|[wW]eb[kK]it|[mM]s)-?/,l={},s=[],f=o?\"webkit\":i?\"ms\":t?\"Moz\":\"\",u=(e=e.match(/AppleWebKit\\/(\\d+)/))&&~~e[1]<540,c=[\"transform\",\"transform-origin\",\"transform-style\",\"transition\",\"transition-delay\",\"transition-duration\",\"transition-property\",\"transition-timing-function\",\"animation\",\"animation-delay\",\"animation-direction\",\"animation-duration\",\"animation-fill-mode\",\"animation-iteration-count\",\"animation-name\",\"animation-play-state\",\"animation-timing-function\",\"appearance\",\"backface-visibility\",\"perspective\",\"perspective-origin\"],m=d();function d(){return r.getComputedStyle(r.document.body,null)}function p(e,t,i){if(!e)throw new Error(\"No element specified!\");if(E(t)){if(!(t in e.style)&&p.BREAK_ON_ERROR)throw new Error(\"Invalid CSS attribute \"+t);if(void 0===i)return e.style[t];e.style[t]=i}else{if(-1==s.indexOf(t)&&y(t),void 0===i)return e.style[l[t]];e.style[l[t]]=i}}function w(e,t){if(!e)throw new Error(\"No element specified!\");var i,e=e.ownerDocument.defaultView.getComputedStyle(e,null);if(u&&-1=this.win.innerWidth||t.clientY<=0||t.clientY>=this.win.innerHeight)&&this.cancelInteraction()},TouchEventSimulator.prototype.handleDragStart=function(t){return t.preventDefault(),!1},TouchEventSimulator.prototype.handlePointerDown=function(t){0==t.button&&(this.touch={identifier:0,target:t.target},this.updateTouchCoordinates(t),this.fireTouchEvent(\"touchstart\",t))},TouchEventSimulator.prototype.handlePointerMove=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent(\"touchmove\",t))},TouchEventSimulator.prototype.handlePointerUp=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent(\"touchend\",t))},TouchEventSimulator.prototype.handlePointerCancel=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent(\"touchcancel\",t),this.touch=null)},TouchEventSimulator.prototype.fireTouchEvent=function(t,e){var n=this.doc.createEvent(\"HTMLEvents\");n.initEvent(t,!0,!0),\"touchend\"==t||\"touchcancel\"==t?(n.touches=n.targetTouches=[],n.changedTouches=[this.touch]):n.touches=n.targetTouches=n.changedTouches=[this.touch],e.target.dispatchEvent(n)},TouchEventSimulator.prototype.cancelInteraction=function(){this.touch&&(this.fireTouchEvent(\"touchcancel\",this.touch),this.touch=null)};;\nfunction SwipeListener(t){var a,n,c,h,e=t.target,o=t.swipeNodeGetter,i=t.swipe,u=t.minLength||50,r=Object.create(ClickPreventer).initClickPrevention(function(){return e});function s(t,e){return Math.abs(t)>Math.abs(e)?0Math.min(50,u)&&(null===c?c=s(e,t):(e=s(e,t),c!=e&&d())))}function g(t){d(),u<=h&&(i(c,h),r.attachClickPreventionHandler())}attach(window,\"touchstart\",noop,!1),attach(e,\"touchstart\",function(t){creative.adapter.useNativeClickForTapDetection||t.preventDefault(),1==t.touches.length&&(a=t.changedTouches[0].pageX,n=t.changedTouches[0].pageY,h=0,c=null,attach(o(),\"touchmove\",l,!1),attach(o(),\"touchend\",g,!1),r.detachClickPreventionHandler())},!1)};\nvar ClickPreventer={initClickPrevention:function(e){return this._getDefaultClickPreventionNode=e||function(){},this._clickPreventionNode=null,this._clickPreventionHandler=this._clickPreventionHandler.bind(this),this},attachClickPreventionHandler:function(e){creative.adapter.nativeClickEmittedOnSwipe&&!this._clickPreventionNode&&(this._clickPreventionNode=e||this._getDefaultClickPreventionNode(),attach(this._clickPreventionNode,\"click\",this._clickPreventionHandler,!0))},detachClickPreventionHandler:function(){creative.adapter.nativeClickEmittedOnSwipe&&this._clickPreventionNode&&(detach(this._clickPreventionNode,\"click\",this._clickPreventionHandler,!0),this._clickPreventionNode=null)},_clickPreventionHandler:function(e){e.stopPropagation(),this.detachClickPreventionHandler()}};;\nfunction PlaceboBar(i,n,r,e){var t=!1,l=document.createElement(\"div\"),a=(l.className=\"celtra-placebobar\",l.style.cssText=\"position: absolute; bottom: 60px; left: 0; right: 0; margin: auto; z-index: 20; width: 215px; height: 8px;\",document.createElement(\"img\")),a=(a.src=creative.resourceUrl+\"runner/clazzes/CreativeUnit/loading-back.png\",a.style.position=\"absolute\",a.style.width=\"100%\",a.style.height=\"100%\",l.appendChild(a),document.createElement(\"div\")),o=(a.style.position=\"absolute\",a.style.top=\"2px\",a.style.bottom=\"2px\",a.style.left=\"3px\",a.style.right=\"3px\",l.appendChild(a),document.createElement(\"div\"));return o.style.background=\"url(\"+creative.resourceUrl+\"runner/clazzes/CreativeUnit/loading-over.png) \"+e+\" repeat-x\",o.style.position=\"absolute\",o.style.width=\"0\",o.style.height=\"100%\",a.appendChild(o),l.start=function(){var a;t||(t=!0,a=new Date,setTimeout(function e(){if(!l.parentNode)return;var t=Math.min((new Date-a)/i,n);o.style.width=100*t+\"%\";tthis.slidingWindow&&this.signals.shift(),i={x:(i=this.signals.reduce(function(i,e){return{x:i.x+e.x,y:i.y+e.y,z:i.z+e.z}})).x/this.signals.length,y:i.y/this.signals.length,z:i.z/this.signals.length},this.prevSignal&&(e=null,h=Math.abs(i.x-this.prevSignal.x),s=Math.abs(i.y-this.prevSignal.y),t=Math.abs(i.z-this.prevSignal.z),90===Math.abs(creative.adapter.orientation)&&(n=s,s=h,h=n),sthis.shakeThreshold?e=\"x\":hthis.shakeThreshold?e=\"y\":hthis.shakeThreshold&&(e=\"z\"),(h>this.shakeThreshold||s>this.shakeThreshold||t>this.shakeThreshold)&&this.emit(\"shake\",e)),this.prevSignal=i)};;\n!function(){\"use strict\";t=window.navigator.userAgent,e=window.navigator.vendor,i=!!document.fonts;var t,e,i,r=/Apple/.test(e)?(e=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))(?:\\.([0-9]+))/.exec(t))?i&&603=this._targetTime?(this.pause(),this.value=this._targetValue,defer(this._callback||noop),this._startValue=null,this._startTime=null,this._targetValue=null,this._targetTime=null,this._callback=null):this.value=Math.pow(i/this._targetTime,this.options.exp)*e+this._startValue};;\nfunction ThresholdObserver(e){this.threshold=e,this._value=null}extend(ThresholdObserver.prototype,EventEmitter),Object.defineProperty(ThresholdObserver.prototype,\"value\",{get:function(){return this._value},set:function(e){var t,h;null!==this._value&&this._value!==e&&(t=this._value-this.threshold)*(h=e-this.threshold)<=0&&(t<0?this.emit(\"up\"):h<0&&this.emit(\"down\")),this._value=e}});;\nfunction BaseCreativeUnit(){}inherit(BaseCreativeUnit,View),BaseCreativeUnit.IGNORABLES=[\"INPUT\",\"SELECT\",\"TEXTAREA\",\"BUTTON\"],BaseCreativeUnit.prototype.awake=function(){BaseCreativeUnit.uber.awake.call(this),this._availableSize={width:0,height:0},this._isRendering=!1,this._engagementTracker=null,this._rxState=null,this._rxStateCopies=[]},BaseCreativeUnit.prototype.createNode=function(){return Logger(\"unit\").log(\"Starting to load \"+this),this.on(\"loaded\",creative.adapter.perf.start(\"CreativeUnit.load\").end),creative.experiments.get(\"TrackingLoadingTimes\")&&this.once(\"_firstScreenLoaded\",function(){var e,t=Date.now()-1e3*creative.runtimeParams.payloadJsClientTimestamp;t<3e4&&(e={unitName:this.name},creative.aggregatorTracking.trackAggregator(\"unitLoadTime\",t,e),creative.aggregatorTracking.trackAggregator(\"unitLoadSuccesses\",e))}.bind(this)),creative.adapter.on(\"mediaStopRequested\",function(e){this.emit(\"mediaStopRequested\",e)}.bind(this)),this.unitDiv=BaseCreativeUnit.uber.createNode.call(this),this._engagementTracker=new EngagementTracker(this.unitDiv,creative),Tapper(this.unitDiv,this.useClickForTap),attach(this.unitDiv,\"touchstart\",this._handleTouchStart.bind(this)),attach(this.unitDiv,\"touchmove\",this._handleTouchMove.bind(this)),this.unitDiv},BaseCreativeUnit.prototype.setAvailableSize=function(e,t){var r=this._availableSize.width!=e||this._availableSize.height!=t;return this._availableSize.width=e,this._availableSize.height=t,r},BaseCreativeUnit.prototype.getAvailableSize=function(){return{width:this._availableSize.width,height:this._availableSize.height}},BaseCreativeUnit.prototype.enterRenderTree=function(){throw new Error(\"Not implemented\")},BaseCreativeUnit.prototype.exitRenderTree=function(){throw new Error(\"Not implemented\")},BaseCreativeUnit.prototype.finishedLoading=function(){BaseCreativeUnit.uber.finishedLoading.call(this),Logger(\"unit\").log(\"Finished loading \"+this)},BaseCreativeUnit.prototype.getAccessibilityProperties=function(){throw new Error(\"Not implemented\")},BaseCreativeUnit.prototype.openAccessibilityUrl=function(e){var t=new ActionContext(this.currentScreen);this.goToURLAction(t,{url:e,reportLabel:e},noop)},BaseCreativeUnit.prototype._handleTouchStart=function(e){if(!this.swipeable&&!creative.adapter.useNativeClickForTapDetection){for(var t=e.target;1!=t.nodeType;)t=t.parentNode;var r=function(){for(;t!==this.unitDiv;){if(t.className&&hasClass(t,\"map-container\"))return!0;t=t.parentNode}return!1}.bind(this);-1!=BaseCreativeUnit.IGNORABLES.indexOf(t.nodeName)||r()||e.preventDefault()}},BaseCreativeUnit.prototype._handleTouchMove=function(e){this.swipeable||e.preventDefault()},BaseCreativeUnit.prototype.createRxState=function(){this._rxState=this._generateNewRxStateObject()},BaseCreativeUnit.prototype._generateNewRxStateObject=function(){return new StateObject({left:null,top:null,right:null,bottom:null,width:null,height:null,vw:null,vh:null,x:null,y:null,pageYOffset:null})},BaseCreativeUnit.prototype.updateRxState=function(e){var t;this._rxState&&(e=getElementRectRelativeToTopViewport(e),t=creative.adapter.getTopWindow(),this._rxState.left=~~e.left,this._rxState.top=~~e.top,this._rxState.right=~~e.right,this._rxState.bottom=~~e.bottom,this._rxState.width=~~e.width,this._rxState.height=~~e.height,this._rxState.vw=t.innerWidth,this._rxState.vh=t.innerHeight,this._rxState.pageYOffset=t.pageYOffset,this._rxState.x=~~(e.left+e.width/2-t.innerWidth/2),this._rxState.y=~~(e.top+e.height/2-t.innerHeight/2),this._rxStateCopies.forEach(function(e){e.copyFrom(this._rxState)}.bind(this)))},BaseCreativeUnit.prototype.getRxStateObject=function(){var e;return this._rxState?((e=this._generateNewRxStateObject()).copyFrom(this._rxState),this._rxStateCopies.push(e),e):null},BaseCreativeUnit.prototype.goToScreenAction=function(e,t,r){throw new Error(\"Not implemented\")},BaseCreativeUnit.prototype.alertAction=function(e,t,r){this.alert({message:t.text},r)},BaseCreativeUnit.prototype.checkOrientationAction=function(e,t,r){var a,i=creative.adapter.orientation;0===i||180===i?a=t.onPortrait:-90!=i&&90!=i||(a=t.onLandscape),a?a(e,r):r()},BaseCreativeUnit.prototype.checkOrientationActionDryRun=BaseCreativeUnit.prototype.checkOrientationAction,BaseCreativeUnit.prototype._processURLParams=function(e){return\"string\"!=typeof e?e:creative.macros(e)},BaseCreativeUnit.prototype._addUrlAppendage=function(e){var t;return creative.urlOpenedUrlAppendage?(t=this.size.width+\"x\"+this.size.height,e+(0<=e.indexOf(\"?\")?\"&\":\"?\")+creative.urlOpenedUrlAppendage.replace(new RegExp(\"{celtraFirstUnitSize}\",\"ig\"),t)):e},BaseCreativeUnit.prototype.openBrowser=function(e,t,r,a){if(!t)return(r||noop)();creative.adapter.trackEventsAndOpenBrowser(this._processURLParams(t),creative.shouldClickThroughToNewWindow(e),r,a)},BaseCreativeUnit.prototype.openClickThroughDestinationAction=function(e,t,r){var a=creative.clickThroughDestinationUrl,i=creative.shouldClickThroughToNewWindow(e),n=!1,o=\"clickThroughDestinationOpened\",s=function(){n||(n=!0,creative.adapter.openBrowser(this._processURLParams(a),i))}.bind(this);a&&-1==[\"http://\",\"https://\"].indexOf(a)?(creative.adapter._stopAllMedia(),0this.size.width||t>this.size.height)&&(r.style.backgroundSize=\"contain\"),a.color&&(r.style.backgroundColor=a.color),attach(r,\"tap\",function(e){r.parentNode.removeChild(r),i()},!1),document.createElement(\"div\"));e.className=\"celtra-back-button touchable \"+this.alignBackButtonHorizontal,r.appendChild(e)}.bind(this);a.file.meta?r(a.file.meta.width,a.file.meta.height):((t=new Image).onload=function(){r(this.width,this.height)},t.onerror=function(e){return console.error(\"Couldn't display image: \"+a.file.getUrl()),i()},t.src=a.file.getUrl())},BaseCreativeUnit.prototype.saveImageAction=function(i,n,o){var e,s=\"imageSaveAttempted\";function r(e,t){var r=e.getOriginalUrl(),a=e.name,e=e.blobHash;i.track({name:s,blobHash:e,label:n.reportLabel}),i.trackClickThrough(),creative.adapter.canSaveImage()?creative.adapter.trackingCenter.flush(function(){var e=\"shared.png\",e=(void 0!==a?e=a:\"string\"==typeof t&&0=this._serverReportedDuration||(e=!this._serverReportedDuration||t.tothis._currentTime&&(this._currentTime=this._video.currentTime),this._currentTime},t.prototype.start=function(){this._running||(this._running=!0,this._viewDirectionsObserver&&this._viewDirectionsObserver.start(),s().mediaState.startVideo(),this._firstSegmentEmitted||(this._currentTime=this.getCurrentTime()+.01,this.trackVideoPlayedSegment({from:0,to:this.getCurrentTime()}),this._firstSegmentEmitted=!0),this._playedSegmentComputationUnit.init(this.getCurrentTime()),clearInterval(this._intervalId),this._intervalId=setInterval(this.tick,250))},t.prototype.stopAndReset=function(){this.stop(!0),this._playedSegmentComputationUnit&&(this._playedSegmentComputationUnit.reset(),this._currentTime=0,this._firstSegmentEmitted=!1,this._viewDirectionsObserver&&this._viewDirectionsObserver.reset())},t.prototype.flush=function(){this._playedSegmentComputationUnit&&this._playedSegmentComputationUnit.flush()},t.prototype.stop=function(t){(this._running||t)&&(this._running&&(s().mediaState.stopVideo(),this._running=!1,clearInterval(this._intervalId)),this._viewDirectionsObserver&&this._viewDirectionsObserver.stop(),this._playedSegmentComputationUnit.addEvent(this.getCurrentTime()),this._playedSegmentComputationUnit.flush(t))},t.prototype.trackDurationChange=function(){var t,e,i,s;this.checkDuration&&(t=this._video.duration,e=-1!==n.indexOf(t),i=-1!==r.indexOf(t),s=t!==this._lastObservedDuration,e||i||!s||(this._serverReportedDuration=t,this.emit(\"videoDurationUpdate\",{duration:t}),this._lastObservedDuration=t))},t.prototype.tick=function(){this.trackDurationChange();var t=this.getCurrentTime(),e=Date.now()-(this._lastTickTime||Date.now());t==this._lastObservedPosition&&1e3Math.min(1,.25*i)},videoFirstQuartile:function(n,t,i){i*=.25;return nMath.max(.75*i,i-2)}};window.QuartileEventsEmitter=function(n){n.QUARTILE_EVENTS=i;var r={},u=(Object.keys(i).forEach(function(n){r[n]=i[n]}),null),t=function(){var n,t=null===u||null!==u&&this.currentTime>u?this.currentTime:u,i=(n=this).serverReportedDuration||(-1!==o.indexOf(n.duration)?null:n.duration);if(null!==i&&null!==u&&t&&t-u<1)for(var e in 0e&&(t.apply(n,arguments),o.lastCall=Date.now())}},o.isFunction=function(t){return\"function\"==typeof t},o.constantly=function(t){return function(){return t}},o.hash=function(){for(var t=Array.prototype.slice.apply(arguments),e=0,n=0;n>1,marginVertical:r>>1}},o.removeUnits=function(t){return parseInt(t.replace(/[a-z]+/,\"\"))},o.capitaliseFirstLetter=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},o.createHandlerName=function(t,e){return(e=e||\"on\")+o.capitaliseFirstLetter(t)},o.forEach=function(t,e,n){for(var i in t)e.call(n,t[i],i,t)},o.changeStyle=function(t,e,n){for(var i,r=0;rthis._lastPlayingPosition&&(this._lastPlayingPosition=t),this._lastPlayingPosition-this._startPlayingPosition>=this.maxPlayingSegmentLength&&this.flush()},t.prototype.flush=function(t){var i,n;null!=this._startPlayingPosition&&(i=this._startPlayingPosition,n=this._lastPlayingPosition,(t||.4this._duration?this._duration:t)>=this._completionMarker,e=(this._last.inCompletionWindow&&!i&&(this._last=this._initState()),Math.floor(t)+1);if(this._last.playingSecond!=e){var a=this._last.playingSecond>e?0:this._last.playingSecond;if(a+1=this._quartileDurations[i]&&(delete this._quartileDurations[i],this.emit(i,t))},s.prototype._emitVideoDurationUpdate=function(t){this.emit(\"videoDurationUpdate\",t)},t.PlaybackTrackingEventsEmitter=s}(this);;\n!function(t){function i(t,i,e){this._context=i,this._prefix=e||\"video\",[\"start\",\"firstQuartile\",\"midpoint\",\"thirdQuartile\",\"complete\"].forEach(function(i){t.on(i,function(t){this._context.track({name:this._prefix+ucfirst(i),position:t}),\"start\"===i&&creative.trackCreativeRenderedOnVideoStart()}.bind(this))},this),[\"secondPlayed\",\"secondReplayed\"].forEach(function(i){t.on(i,function(t){this._context.track(extend({name:this._prefix+ucfirst(i)},t))}.bind(this))},this),t.on(\"videoDurationUpdate\",function(t){this._context.track({name:this._prefix+ucfirst(\"videoDurationUpdate\"),duration:t})}.bind(this))}extend(i.prototype,EventEmitter),i.prototype.changeContext=function(t){this._context=t},t.PlaybackTrackingEventsRecorder=i}(this);;\n!function(){var A=[\".video-player-wrapper {\",\" position: absolute;\",\" width: 100%;\",\" height: 100%;\",\" background: #000;\",\" top: 0;\",\" left: 0;\",\" overflow: hidden;\",\"}\",\".video-player-engine {\",\" position: absolute;\",\" width: 100%;\",\" height: 100%;\",\" min-height: 100%;\",\" top: 0;\",\" left: 0;\",\" margin: 0;\",\" padding: 0;\",\" overflow: hidden;\",\"}\",\".video-player-engine video,\",\".video-player-engine .canvasContainer\",\"{\",\" position: relative;\",\" width: 100%;\",\" height: 100%;\",\" min-height: 100%;\",\" background: #000;\",\" top: 0;\",\" left: 0;\",\"}\",\".video-player-poster {\",\" position: absolute;\",\" background-size: contain;\",\" background-repeat: no-repeat no-repeat;\",\" background-position: center center;\",\"}\",\".video-player-fitting-crop .video-player-poster {\",\" background-size: cover;\",\"}\",\".video-player-engine canvas {\",\" position: relative;\",\" width: 100%;\",\" background: #000;\",\" top: 0;\",\" left: 0;\",\"}\",\".video-player-engine canvas {\",\" image-rendering: optimizeSpeed;\",\" image-rendering: -moz-crisp-edges;\",\" -ms-interpolation-mode: nearest-neighbor;\",\" image-rendering: optimize-contrast;\",\" image-rendering: -webkit-pixelated;\",\" image-rendering: crisp-edges;\",\" image-rendering: -webkit-optimize-speed;\",\" image-rendering: -webkit-optimize-contrast;\",\"}\",\".video-player-wrapper-empty {\",\" background-color: #000;\",\"}\",\".video-player-wrapper-empty::after {\",' content: \"\";',\" position: absolute;\",\" top: 0;\",\" left: 0;\",\" right: 0;\",\" bottom: 0;\",' background-image: url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCIgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4Ij48cGF0aCBmaWxsPSIjY2NjIiBkPSJNMSAxNGMwIDcuMiA1LjggMTMgMTMgMTNzMTMtNS44IDEzLTEzUzIxLjIgMSAxNCAxIDEgNi44IDEgMTR6bTI0IDBjMCA2LjEtNC45IDExLTExIDExUzMgMjAuMSAzIDE0IDcuOSAzIDE0IDNzMTEgNC45IDExIDExem0tMTQtNHY4bDctNC03LTR6Ii8+PC9zdmc+\");',\" background-repeat: no-repeat;\",\" background-position: center;\",\"}\",\".video-controls-container {\",\" position: absolute;\",\" width: 100%;\",\" height: 100%;\",\" top: 0;\",\" left: 0;\",\" font-size: 14px;\",\"}\",\".video-basic-controls-wrapper {\",\" position: absolute;\",\" width: 100%;\",\" height: 100%;\",\"}\",\".video-controls-slider-container {\",\" position: absolute;\",\" width: 100%;\",\" height: 8px;\",\" bottom: -1px;\",\" left: 0;\",\" background: #111;\",\"}\",\".video-controls-progress-bar {\",\" opacity: 0.3;\",\"}\",\".video-controls-progress-bar,\",\".video-controls-time-bar {\",\" position: absolute;\",\" width: 0;\",\" top: 0;\",\" left: 0;\",\" height: 100%;\",\"}\",\"@-webkit-keyframes video-player-spin{\",\" 0% { -webkit-transform: rotate(0deg); }\",\" 100% { -webkit-transform: rotate(359deg); }\",\"}\",\"@-moz-keyframes video-player-spin{\",\" 0% { -moz-transform: rotate(0deg); }\",\" 100% { -moz-transform: rotate(359deg); }\",\"}\",\"@keyframes video-player-spin{\",\" 0% { transform: rotate(0deg); }\",\" 100% { transform: rotate(359deg); }\",\"}\",\".video-player-spinner-big,\",\".video-player-spinner-small {\",\" display: block;\",\" position: absolute;\",\" top: 50%;\",\" left: 50%;\",\" -webkit-animation: video-player-spin 1.5s infinite linear;\",\" animation: video-player-spin 1.5s infinite linear;\",\"}\",\".video-player-spinner-big {\",\" width: 35px;\",\" height: 35px;\",\" margin-top: -17px;\",\" margin-left: -17px;\",' background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAQAAAC00HvSAAADTklEQVR4AZWVTWgcZRyHn/c/7zubbDbJJsTEioiIH7EGq6EIRqwWqbRClXrx4E0QxYt3b4qK9qgoePDmwRYVS6xFW7Ueeqj0kqIVQYwljTVt0o/dZD9n3r/zshGSGpOd54GZ0+9h/qcxbMh03PfK4LPl8cFy0SJsialxIyfHRz+6Y6pkDR0xXWQ8azlaGvt0fF9sMsiTsazh2933fzEyKICu2+bKfP/izg96IlDA6JXmhdPVY81T6Xk2wAuCz1zFTNOh+PKD71sRMIZqY3aa59iERYtktvDrMm735LGCNQaE38/O7WGRzRBCJljrhCyB0l2HXKSgxpw7zt4xNmcBZNUSlU4XGPl4aEhRVc595fd6tvKm8LAEY4qrR0V3T87YyGDMn2d4mC6ZL9JDmEm6gBcYPhiJqlJdnt8/T7dSQ0JEhQEQ4m2Ph4jq3GdDi0N0Lw21arHSL0jP84WCZlQqV1+6Sh5ZRoix9PiiLe1TBbj0w4gnJ4v1qBeQqN8W79HQYeU78tPAIqBFWxwNFbR1mvy0iMEY+qyNvRK4SH68cQAGiaz64MTCBHndkRhngr3SbnYyM6Mz5NYah81EWnXN8D66OSKvxBrjMpH6X+ozNd4Rk1dKxgW1KbVfskpGYapAXqNRXGakdal/o1kHX95VJq/RbcYFWZLGkVY1fE+hvPT6Enmc2y5lnIk0TS8LraXjeM0ceqY6UKVrrbsvRHD+gvViqbyTtvDex4PD7w3Tre4xUzYOhyS/JUiCP3/pkPd49eVH2m+36cbqLrcdR2Rs8qutWcRiqbxRm9c0HDZywLxp2MrGE/FDxoo1VivJTEKCmSYQPXDrJ+LIQppeO3n9NZb5P+LC0+5eEm2Tar12mCvr/lPxU9veNRIy6luXK0f4kA1I9hR2Sp9PSLJIo/4lsxAwR/kX++TYWyZWT6qZrb9rp9pnkj/8dSqUon5zi73TTUhJs4QGV+qfh8h/MmAmRg7GYyGiXpPMlLbP3rS1Y6oJLU3Upxebh1lYs/yataQ9pVcH9hsJqdVMmHYS7ZAm0Ubjx9YJEtZgprmRaKz3hb5HpTeESHyIZYFOIq00f2qe4BqBTTMdrJuKJ+3t0bAUsH7FV5KFZLb9c3oWzwb8AzjvQbz9lli3AAAAAElFTkSuQmCC\");',\"}\",\".video-player-spinner-small {\",\" width: 18px;\",\" height: 18px;\",\" margin-top: -9px;\",\" margin-left: -9px;\",' background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAQAAAD8x0bcAAABeElEQVR4AXXSv2sTYRjA8e89997lcuR60eJQUdpFQQoqdHRWhAoddPBPcHRwE8TZxcXJf0BEsIjuQUQQtZMOpREM9RKL1RrqJbkf771nEGnKJf1+hmd5eKaHSe/vtzf30k63Q9X/8XZte6f8V/QrokopILq9/CB0+nnUip/l7zioUJgxrBbu6rnnodvp9G6wwaG04AEJRvAWHjXcr+3tC3pDcxhmzGcOpH7rxOm9uHfN3repIkMkwJPguljfXwVbAdOaBm3V7VD8pVE2fDpkNhJcQqXqOi+2OKrxJRxVFkXB0Ql1tKS/QZaE2fAkQGS4KbZ3xWM2+xRzpDJYz5Pw6mBxwLQ/vlq2XLMj6ZP9T7VjzYfGN1Qo97IslD9NV8j6d0e7wUrzsSwKExyv3XTOl1n2AWO1AHdt/p4Kkm/xy/xN2cMwb591Lkqj+JGs0wbrNQCy0rjjnQHdN7EZkYOJs8/ZC7pwsASgVp1L6qRVK9NiV3/RHyc/8RftSMiO8WZLaAAAAABJRU5ErkJggg==\");',\"}\",\".video-controls-hiddable,\",\".video-controls-unhiddable {\",\" width: 100%;\",\" height: 100%;\",\"}\",\".video-basic-controls-wrapper .center-button {\",\" position: absolute;\",\" width: 4em;\",\" height: 4em;\",\" border-top-left-radius: 2em;\",\" border-top-right-radius: 2em;\",\" border-bottom-left-radius: 2em;\",\" border-bottom-right-radius: 2em;\",\" background: #111;\",\" margin: auto;\",\" top: 0;\",\" left: 0;\",\" bottom: 0;\",\" right: 0;\",\" text-align: center;\",\" cursor: pointer;\",\" opacity: 0.8;\",\" z-index: 1;\",\"}\",\".center-button div {\",\" position: relative;\",\" width: 100%;\",\" color: white;\",\" font-size: 2em;\",\" top: 0.5em;\",\"}\",\".center-button .celtra-icon-play { left: 0.1em;}\",\".center-button .celtra-icon-replay { top: 0.62em; left:0.05em}\",\".video-basic-controls-wrapper .custom-button {\",\" position: absolute;\",\" height: 100%;\",\" width: 100%;\",\" top: 0;\",\" left: 0;\",\" cursor: pointer;\",\" opacity: 0.8;\",\"}\",\".custom-button img {\",\" margin: auto;\",\" position: absolute;\",\" top: 0;\",\" right: 0;\",\" bottom: 0;\",\" left: 0;\",\"}\",\".video-controls-button {\",\" position: absolute;\",\" cursor: pointer;\",\" font-size: 1.5em;\",\" color: white;\",\" width: 2.5em;\",\" height: 2.5em;\",\"}\",\".video-controls-desktop .video-controls-button div {\",\" margin-top: -0.5em;\",\"}\",\".ie-click-event {\",\" background-color: rgba(255,255,255,0);\",\"}\",\".video-controls-button-shadow {\",\" text-shadow: 1px 1px 3px #000;\",\"}\",\".video-controls-button-top-right {\",\" right: 0;\",\" top: 0;\",\"}\",\".video-controls-desktop .video-controls-button-top-right {\",\" margin-right: 0.5em;\",\" margin-top: 0.5em;\",\" width: 1.5em;\",\" height: 1.5em;\",\"}\",\".video-controls-button-bottom-right {\",\" right: 0;\",\" bottom: 0;\",\"}\",\".video-controls-desktop .video-controls-button-bottom-right {\",\" margin-right: 0.5em;\",\" margin-bottom: 0.75em;\",\" width: 1.5em;\",\" height: 1.5em;\",\"}\",\".video-controls-button div {\",\" position: absolute;\",\" height: 50%;\",\" width: 100%;\",\" left: 0;\",\" text-align: center;\",\" top: 50%;\",\" margin-top: -0.75em;\",\" vertical-align: middle;\",\"}\",\".video-controls-button .celtra-icon-close {\",\" font-size: 0.7em;\",\" left: 0.07412em;\",\"}\",\".video-controls-button .celtra-icon-enter-full-screen,\",\".video-controls-button .celtra-icon-exit-full-screen {\",\" left: 0.09em;\",\"}\",\".video-controls-pending {\",\" animation: video-controls-pending 1s infinite linear;\",\"}\",\"@-webkit-keyframes video-controls-pending {\",\" 0% { opacity: 1 }\",\" 50% { opacity: 0 }\",\" 100% { opacity: 1 }\",\"}\",\"@keyframes video-controls-pending {\",\" 0% { opacity: 1 }\",\" 50% { opacity: 0 }\",\" 100% { opacity: 1 }\",\"}\",\"@font-face {\",' font-family: \"celtraicons\";',' src:url(\"data:application/font-woff;base64,d09GRk9UVE8AAAqEAAoAAAAACjwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAABq8AAAavkHaHf09TLzIAAAekAAAAYAAAAGAIIvzDY21hcAAACAQAAABMAAAATBpVzGRnYXNwAAAIUAAAAAgAAAAIAAAAEGhlYWQAAAhYAAAANgAAADb/fCRYaGhlYQAACJAAAAAkAAAAJAPjAfJobXR4AAAItAAAA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AAABgALAEIAAQAAAAAACgAoAIcAAwABBAkAAQAWAAAAAwABBAkAAgAOAGMAAwABBAkAAwAWACwAAwABBAkABAAWAHEAAwABBAkABQAWABYAAwABBAkABgAWAE0AAwABBAkACgAoAIcAYwBlAGwAdAByAGEAaQBjAG8AbgBzAFYAZQByAHMAaQBvAG4AIAAxAC4AMABjAGUAbAB0AHIAYQBpAGMAbwBuAHNjZWx0cmFpY29ucwBjAGUAbAB0AHIAYQBpAGMAbwBuAHMAUgBlAGcAdQBsAGEAcgBjAGUAbAB0AHIAYQBpAGMAbwBuAHMARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\");',\" font-weight: normal;\",\" font-style: normal;\",\"}\",'[class^=\"celtra-icon-\"], [class*=\" celtra-icon-\"] {',' font-family: \"celtraicons\";',\" speak: none;\",\" font-style: normal;\",\" font-weight: normal;\",\" font-variant: normal;\",\" text-transform: none;\",\" line-height: 1;\",\" -webkit-font-smoothing: antialiased;\",\" -moz-osx-font-smoothing: grayscale;\",\"}\",'.celtra-icon-redo:before { content: \"\\\\e600\"; }','.celtra-icon-close:before { content: \"\\\\e60d\"; }','.celtra-icon-go-landscape:before { content: \"\\\\e603\"; }','.celtra-icon-twitter:before { content: \"\\\\e605\"; }','.celtra-icon-facebook:before { content: \"\\\\e606\"; }','.celtra-icon-phone:before { content: \"\\\\e607\"; }','.celtra-icon-play:before { content: \"\\\\e608\"; }','.celtra-icon-pause:before { content: \"\\\\e609\"; }','.celtra-icon-exit-full-screen:before { content: \"\\\\e60a\"; }','.celtra-icon-enter-full-screen:before { content: \"\\\\e60b\"; }','.celtra-icon-unmute:before { content: \"\\\\e60c\"; }','.celtra-icon-mute:before { content: \"\\\\e601\"; }','.celtra-icon-replay:before { content: \"\\\\e602\"; }','.celtra-icon-close2:before { content: \"\\\\e604\"; }',\".spinner .center-button {\",\" display: none;\",\"}\",\".web-audio .celtra-icon-mute, .web-audio .celtra-icon-unmute { color: red; }\",\"\"].join(\"\\n\");this.VideoPlayerCss=A}();;\n!function(){function t(e){switch(e){case\"video/mp4\":return\"video.mp4\";case\"video/webm\":return\"video.webm\";case\"video/avi\":return\"video.avi\";case\"audio/mp4\":return\"audio.m4v\";default:throw new Error(\"Unknown mime type\")}}var n={startMuted:!1,preload:!1,from:null,to:null,blobHash:null,hasAudio:!0,skipCodecs:[],codecPriority:[\"vp9\",\"h265\",\"h264\",\"vp8\"],transcodingGroup:\"inline\",customUrlParameters:{},forceMPEG4Video:!1,forceMPEG1Video:!1},a=CeltraPlayerUtils.composeUrl,c=CeltraPlayerUtils.filterObject,s=CeltraPlayerUtils.getUrl,u=(createSourceObject=CeltraPlayerUtils.createSourceObject,generateMediaType=CeltraPlayerUtils.generateMediaType,VideoEngineProvider={},{vp9:{low:[\"vp9_served_480p\"],medium:[\"vp9_served_720p\"],high:[\"vp9_served_1080p\"]},h265:{low:[\"x265_served_480p\"],medium:[\"x265_served_1080p\"],high:[\"x265_served_1080p\"]},h264:{low:[\"mpeg4HQ\"],medium:[\"mpeg4HQPlus\"],high:[\"mpeg4HD\"]},vp8:{low:[\"webmHQ\"],medium:[\"webmHQ\"],high:[\"webmHD\"]}}),l=function(e,r){return!!{h265:deviceInfo.browser.chrome(),vp9:deviceInfo.os.android(null,\"7.1\")||r.isVideo360&&deviceInfo.browser.firefox()||deviceInfo.browser.safari()&&deviceInfo.deviceType.desktop()}[e]},d=function(){return deviceInfo.deviceType.desktop()||deviceInfo.os.ios(\"10\",null)&&!deviceInfo.browser.chrome(null,\"64\")||deviceInfo.os.android()&&deviceInfo.browser.chrome(\"53\",null)&&!deviceInfo.browser.samsung()||deviceInfo.os.android()&&deviceInfo.browser.samsung(\"6.4\",null)},v=(AudioEngineProvider={},function(e){return\"undefined\"!=typeof creative?(e=creative.videoTranscodingPresets[e]&&creative.videoTranscodingPresets[e].algoVersion,creative.version+(e?\"-\"+e:\"\")):null});VideoEngineProvider.createVideoEngineSpec=function(e,r){var r=merge(n,r),i=(r.skipCodecs=r.skipCodecs.filter(function(e){return-1===[\"h264\",\"vp8\"].indexOf(e)}),\"1\"==r.campaignExplorer&&(r.startMuted=!0),o=e,(i=r).forceMPEG4Video||!i.forceMPEG1Video&&!i.fallbackToMPEG1&&(d()||o)?\"html5\":\"jsVideo\"),o={inUserInitiatedThread:e,startMuted:r.videoElement?r.videoElement.muted:r.startMuted};return\"jsVideo\"==i?merge({clazz:\"JsVideoEngine\",presets:[(i=r).fallbackToMPEG1?\"mpeg1LQVideo\":\"mpeg1SHQVideo\"],engineType:\"mpeg1\",doAVSync:i.hasAudio&&!i.isTeaser,isTeaser:i.isTeaser,preload:i.preload,options:{}},o):merge(function(r,e){var i=\"\";if(r.isMasterVideo)if(deviceInfo.deviceType.desktop()&&!r.capStreamAtHQPlus)i=\"high\";else i=\"medium\";else if((deviceInfo.deviceType.desktop()||r.isVideo360||r.hqQuality||r.isSnapchatFormat)&&!r.isTeaser)i=\"medium\";else i=\"low\";var o=r.codecPriority.filter(function(e){return r.skipCodecs.indexOf(e)===-1&&!l(e,r)}).map(function(e){return u[e][i]}).reduce(function(e,r){return e.concat(r)},[]).filter(function(e){return creative.videoTranscodingGroups[r.transcodingGroup].indexOf(e)!==-1});if(r.videoElement){var n=document.createElement(\"video\");var d=[\"\",\"maybe\",\"probably\"];var t=o.map(function(e){var r=creative.videoTranscodingPresets[e].mediaType;var i=deviceInfo.browser.chrome()&&e.indexOf(\"mpeg4\")===0?\"probably\":n.canPlayType(generateMediaType(r));return{id:e,canPlayType:i}}).sort(function(e,r){if(e.canPlayType===r.canPlayType)return 0;return d.indexOf(e.canPlayType)>d.indexOf(r.canPlayType)?-1:1}).shift().id;o=[t]}var a=!deviceInfo.deviceType.desktop()&&r.isVideo360&&e&&!r.startMuted,c;return{clazz:deviceInfo.os.ios(null,\"10\")&&r.isVideo360?\"CrossOriginHtml5VideoEngine\":\"Html5VideoEngine\",presets:o,engineType:\"html5\",doAVSync:a,isTeaser:r.isTeaser,preload:r.preload,crossOrigin:true,options:{}}}(r,e),o)},VideoEngineProvider.createVideoSourceObjects=function(e,n){var d=e.doAVSync||e.isTeaser;return e.presets.map(function(e){r=n;var r=c(merge({from:r.from,to:r.to,muted:d?\"1\":null,transform:\"VideoStream\",celtraCacheBust:v(e)},r.customUrlParameters)),i=creative.videoTranscodingPresets[e].mediaType,o=t(i.mime);return createSourceObject(a(s(\"cachedApi\"),\"videoStream\",n.blobHash,e,o,r),i)})},window.VideoEngineProvider=VideoEngineProvider,AudioEngineProvider.createAudioEngineSpec=function(e){return e.doAVSync?{clazz:\"undefined\"!=typeof AudioContext||\"undefined\"!=typeof webkitAudioContext?\"WebAudioEngine\":\"Html5AudioEngine\",preload:e.preload}:null},AudioEngineProvider.createAudioSourceObjects=function(n){return[\"aacAudio\"].map(function(e){var r=n?(r=n,c(merge({from:r.from,to:r.to,transfom:\"VideoStream\",celtraCacheBust:v(e)},r.customUrlParameters))):{},i=creative.videoTranscodingPresets[e].mediaType,o=t(i.mime);return createSourceObject(a(s(\"cachedApi\"),\"videoStream\",n.blobHash,e,o,r),i)})},window.AudioEngineProvider=AudioEngineProvider}();;\n!function(i){function t(e,t,i,n,s){this._containerEl=e,this._opts=merge({},o,s),this._videoEngine=null,this._videoEngineSpecProvider=t,this.isUserGazing=n,this._doc=e.ownerDocument,this._win=this._doc.defaultView,this._initialized=!1,this._firstPlay=!0,this.silentPauseActive=!1,this._engineType=null,this._videoPresets=[],this._muted=!0,i&&(this._controlsController=i(this,this._opts),this._controlsController&&this._controlsController.on(\"userInteraction\",this.emit.bind(this,\"userInteraction\"))),this._aspectRatio=this._opts.videoWidth/this._opts.videoHeight,this.isFullScreen=!this.playsInline(),this.isDesktop=this._opts.isDesktop,this.anchoringPoint=this._opts.anchoringPoint,this.buffered=0,this._state=null,this._posterShown=!0,this._seeked=!1,this._repeated=0,this.playSucceeded=!1,this._playingEmitted=!1,this._firstRenderEmitted=!1,this._timeUpdateCounter=0,this._lastTimeUpdateEmitted=0,this.play=this.play.bind(this),this.silentPlay=this.silentPlay.bind(this),this.pause=this.pause.bind(this),this.silentPause=this.silentPause.bind(this),this.mute=this.mute.bind(this),this.unMute=this.unMute.bind(this),this.redraw=this.redraw.bind(this),this.enterFullScreen=this.enterFullScreen.bind(this),this.exitFullScreen=this.exitFullScreen.bind(this),this.destroy=this.destroy.bind(this),this._onFullscreenChange=this._onFullscreenChange.bind(this),this._init(),this.changeState(CeltraPlayerUtils.UNSTARTED),this._fullScreenAncestors=[]}extend(t.prototype,StatefulEventEmitter),Object.defineProperty(t.prototype,\"paused\",{get:function(){return this._videoEngine&&this._videoEngine.paused}}),Object.defineProperty(t.prototype,\"componentName\",{get:function(){return this._opts.componentName}}),Object.defineProperty(t.prototype,\"duration\",{get:function(){return this.serverReportedDuration||this._videoEngine&&this._videoEngine.duration||0}}),Object.defineProperty(t.prototype,\"serverReportedDuration\",{get:function(){return this._opts.duration}}),Object.defineProperty(t.prototype,\"currentTime\",{get:function(){return this._videoEngine&&this._videoEngine.getCurrentTime()||0},set:function(e){this._videoEngine&&this._videoEngine.setCurrentTime(e)}}),Object.defineProperty(t.prototype,\"reportsSeeking\",{get:function(){return!(!this._videoEngine||!this._videoEngine.reportsSeeking)}}),Object.defineProperty(t.prototype,\"muted\",{get:function(){return this._muted}}),Object.defineProperty(t.prototype,\"fullscreen\",{get:function(){return this.isFullScreen}}),Object.defineProperty(t.prototype,\"engineType\",{get:function(){return this._engineType}}),Object.defineProperty(t.prototype,\"videoPresets\",{get:function(){return this._videoPresets}}),Object.defineProperty(t.prototype,\"activeSrc\",{get:function(){return this._videoEngine&&this._videoEngine.activeSrc}}),Object.defineProperty(t.prototype,\"activePreset\",{get:function(){return this._videoPresets&&this._videoPresets.filter(function(e){return this.activeSrc&&~this.activeSrc.indexOf(e)}.bind(this))[0]}}),Object.defineProperty(t.prototype,\"engineInitialized\",{get:function(){return this._initialized}}),Object.defineProperty(t.prototype,\"ended\",{get:function(){return this.isState(CeltraPlayerUtils.ENDED)}});var o={canShowSpinner:!0,closeFSOnEnd:!1,fitting:\"fit\",fullscreenMode:\"both\",pauseOnEnd:!1,playFrom:null,playTo:null,poster:\"data:image/gif;base64,\"+CeltraPlayerUtils.EMPTY_PIXEL,repeatTimes:0,videoWidth:160,videoHeight:100},n={loadstart:\"onLoadStart\",loadedmetadata:\"onLoadedMetaData\",durationchange:\"onDurationChange\",progress:\"onProgress\",timeupdate:[\"onTimeUpdate\",\"onTimeUpdateRepeat\"],canplay:\"onCanPlay\",play:\"onPlay\",playing:\"onPlaying\",pause:\"onPause\",autoplayrejected:\"onAutoplayRejected\",autoplaynotpossible:\"onAutoplayNotPossible\",forcemuted:\"onForceMuted\",ended:\"onEnded\",buffering:\"onBuffering\",endbuffering:\"onEndBuffering\",muted:\"onMuted\",unmuted:\"onUnMuted\",seeking:\"onSeeking\",seeked:\"onSeeked\",exitfullscreen:\"onExitFullScreen\",webkitendfullscreen:\"onExitFullScreen\",error:\"onError\",canunmute:\"onCanUnMute\",custominfo:\"onCustomInfo\",playersourceloading:\"onPlayerSourceLoading\",volumechange:\"onVolumeChange\"};t.DOM=['\"],t.prototype._init=function(){var e;CeltraPlayerUtils.createDom(this._doc,t.DOM,this._opts,CeltraPlayerUtils.xBindFactory(this)),CeltraPlayerUtils.insertStyleTag(\"celtra-video-player-style\",VideoPlayerCss,this._doc),this._controlsController&&(this._controlsEl=this._controlsController.render(this._doc),this._controlsWrapperEl.appendChild(this._controlsEl)),this._containerEl.appendChild(this._wrapperEl),this._posterShow(),this._controlsController&&this._controlsController.adjustSizes(this._containerEl.clientHeight),this._opts.preload&&(e=this.createSpecs(!1,this._opts.startMuted),this.initialize(e)),this.dtCanFullscreen=this.isDesktop&&this._toggleDesktopFSStateHandlers(\"add\")},t.prototype.setDimensions=function(e,t){this.width=e,this.height=t,this.redraw(),this.emit(\"rendered\")},t.prototype.getVideoElement=function(){return this._videoEngine},t.prototype.getControlsElement=function(){return this._controlsEl},t.prototype.getWrapperElement=function(){return this._wrapperEl},t.prototype._posterHide=function(){this._posterShown&&(this._posterShown=!1,this._posterEl.style.display=\"none\")},t.prototype._posterShow=function(){this._posterShown||(this._posterShown=!0,this._posterEl.style.display=\"\")},extend(t.prototype,{onLoadStart:function(){this.emit(\"loadstart\")},onLoadedMetaData:function(){this.redraw(),this.emit(\"canunmute\")},onCanPlay:function(){this.emit(\"canplay\")},onDurationChange:function(){this.emit(\"durationchange\")},onBuffering:function(){this.changeState(CeltraPlayerUtils.BUFFERING),this.emit(\"buffering\")},onEndBuffering:function(){this.emit(\"endbuffering\")},onPlayerSourceLoading:function(e){(this._opts.autoplay||e)&&this.emit(\"playersourceloading\")},onMuted:function(){this._muted=!0,this.emit(\"muted\")},onUnMuted:function(){this._muted=!1,this.emit(\"unmuted\")},onVolumeChange:function(e){this._muted=0==e,this.emit(this._muted?\"muted\":\"unmuted\"),this.emit(\"volumechange\",e)},onProgress:function(){\"object\"==typeof this._videoEngine.buffered&&0=this._opts.playTo&&(this._hasToBeRepeated()?this._doRepeat():(this.pause(),this._doEnd()))},onPlay:function(){this.emit(\"play\")},onPlaying:function(){this.emit(\"playing\"),this.changeState(CeltraPlayerUtils.PLAYING),this.playSucceeded=!0,this.redraw()},onPause:function(){this.changeState(CeltraPlayerUtils.PAUSED),this.emit(\"pause\")},onAutoplayRejected:function(){this.emit(\"autoplayrejected\")},onAutoplayNotPossible:function(){this.emit(\"autoplaynotpossible\")},onForceMuted:function(){this.emit(\"forcemuted\")},onExitFullScreen:function(){this.exitFullScreen()},onEnded:function(){this._playingEmitted=!1,this._hasToBeRepeated()?this._doRepeat():this._doEnd()},getContainerDimensions:function(){var e;return this.isFullScreen?{width:(e=this.dtCanFullscreen?this._wrapperEl:this._wrapperEl.parentNode).clientWidth,height:e.clientHeight}:{width:this.width,height:this.height}},redraw:function(){var e=\"fit\"!==this._opts.fitting,t=this._aspectRatio,i=this.getContainerDimensions(),n=CeltraPlayerUtils.fitComponent(100*t,100,i.width,i.height,e);switch(this.anchoringPoint){case\"top\":n.marginVertical=0;break;case\"bottom\":n.marginVertical=Math.ceil(i.height-n.height)}this._opts.videoElement||(this._wrapperEl.style.background=this._opts.barColor);function s(e){e.width=n.width+\"px\",e.height=n.height+\"px\",e.minHeight=n.height+\"px\",e.left=n.marginHorizontal+\"px\",e.top=n.marginVertical+\"px\"}e?(s(this._engineContainerEl.style),s(this._posterEl.style),(t=this._controlsWrapperEl.style).width=i.width+\"px\",t.height=i.height+\"px\",t.minHeight=i.height+\"px\",t.left=0,t.top=0):(s(this._engineContainerEl.style),s(this._posterEl.style),s(this._controlsWrapperEl.style))},onSeeking:function(){this.emit(\"seeking\")},onSeeked:function(e){if(this._seeked){switch(this._seeked=!1,this._stateBeforeSeek){case CeltraPlayerUtils.PLAYING:this.play();break;case CeltraPlayerUtils.PAUSED:this.silentPause()}this._stateBeforeSeek=void 0}this.emit(\"seeked\")},onError:function(){this.emit(\"error\")},onCanUnMute:function(){this.emit(\"canunmute\")},onCustomInfo:function(e){this.emit(\"custominfo\",e)}}),extend(t.prototype,{getState:function(){return this._state},mute:function(){this._videoEngine&&\"function\"==typeof this._videoEngine.mute&&this._videoEngine.mute(),this.onMuted()},unMute:function(){this._videoEngine&&\"function\"==typeof this._videoEngine.unMute&&this._videoEngine.unMute(),this.onUnMuted()},silentPlay:function(){this._videoEngine.play()},createSpecs:function(e,t){e=this._videoEngineSpecProvider(e,t),e=merge(e,{options:this._opts}),this._opts.videoStream&&this._opts.videoStream.useRaw&&(e.videoUrl=(creative.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"blobs/\"+this._opts.videoStream.blobHash),t=AudioEngineProvider.createAudioEngineSpec(e);return{videoEngineSpec:e,videoSources:e.videoUrl?[CeltraPlayerUtils.createSourceObject(e.videoUrl,null)]:VideoEngineProvider.createVideoSourceObjects(e,this._opts.videoStream),audioEngineSpec:t,audioSources:t?AudioEngineProvider.createAudioSourceObjects(this._opts.videoStream):null}},initialize:function(e){this._createEngines(e),CeltraPlayerUtils.isNode(this._engineEl)&&!this._engineEl.parentNode&&this._engineContainerEl.appendChild(this._engineEl),e.videoEngineSpec.options.videoElement&&(this._wrapperEl.style.background=\"transparent\"),CeltraPlayerUtils.attachHandlers(this,this._videoEngine,n),void 0!==e.videoEngineSpec.startMuted&&(e.videoEngineSpec.startMuted?this.mute():this.unMute()),this._initialized=!0},play:function(e){null==this._videoEngine?Logger(\"VideoPlayer\").log(\"Video not initialized!\"):(this.isState(CeltraPlayerUtils.UNSTARTED,CeltraPlayerUtils.ENDED)&&this.changeState(CeltraPlayerUtils.BUFFERING),this._firstPlay&&!e&&this.unMute(),this._firstPlay=!1,this._videoEngine.play(),this.emit(\"userplayed\"))},_createEngines:function(e){var t;null===this._videoEngine&&(this._engineType=e.videoEngineSpec.engineType,this._videoPresets=e.videoEngineSpec.presets,\"JsVideoEngine\"==e.videoEngineSpec.clazz?this._videoEngine=new JsVideoEngine(e.videoSources[0].url,this._engineType,e.videoEngineSpec):\"Html5VideoEngine\"==e.videoEngineSpec.clazz&&(this._videoEngine=Html5VideoEngine(e.videoSources,e.videoEngineSpec)),null!==e.audioEngineSpec&&(t=null,\"WebAudioEngine\"==e.audioEngineSpec.clazz?(t=WebAudioEngine(e.audioSources[0].url,e.audioEngineSpec.preload),Object.create(AVSyncWebAudio).init(this,t,e.videoEngineSpec.startMuted)):\"Html5AudioEngine\"==e.audioEngineSpec.clazz&&(t=Html5AudioEngine(e.audioSources,e.audioEngineSpec.preload),Object.create(AVSyncAudio).init(this,t,e.videoEngineSpec.startMuted))),this._engineEl=this._videoEngine.render(this._doc,{playsInline:this.playsInline()}))},silentPause:function(){this._videoEngine.pause()},pause:function(){this._videoEngine&&this._videoEngine.pause(),this.emit(\"userpaused\"),this._playingEmitted=!1},close:function(){this.playsInline()?this.exitFullScreen():this.emit(\"close\")},replay:function(){this.emit(\"replayed\"),this.setCurrentTime(0),this._playingEmitted=!1,this.play()},reset:function(){this._videoEngine.pause(),this._videoEngine.reset(),this._posterShow(),this._controlsController&&this._controlsController.reset(),this._timeUpdateCounter=0,this._playingEmitted=!1},enterFullScreen:function(){if(this._videoEngine){if(this._containerElzIndex=this._containerEl.style.zIndex,this.dtCanFullscreen){var e=this._wrapperEl;(e.requestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen).bind(e)()}else{this.isFullScreen=!0;var t=this._wrapperEl;for(this.isState(CeltraPlayerUtils.PAUSED);t&&!t.getAttribute(\"class\").includes(\"celtra-base-creative-unit\");)t=t.parentNode;t.insertBefore(this._wrapperEl,t.firstChild),this._wrapperEl.style.zIndex=CeltraPlayerUtils.ZINDEX_MAX,this.redraw(),this.silentPauseActive=!0,defer(function(){this.silentPauseActive=!1}.bind(this),500),this._initialized&&this._videoEngine.pause()}this._initialized&&this._videoEngine.play(),this.emit(\"enterfullscreen\")}},exitFullScreen:function(){var e;this.dtCanFullscreen?((e=document).exitFullscreen||e.webkitExitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen).bind(e)():(this.isFullScreen=!1,this.isState(CeltraPlayerUtils.PAUSED,CeltraPlayerUtils.ENDED),this._wrapperEl.style.zIndex=\"\",this._containerEl.style.zIndex=this._containerElzIndex,this._containerEl.appendChild(this._wrapperEl),this.silentPauseActive=!0,defer(function(){this.silentPauseActive=!1}.bind(this),500),this.once(\"pause\",CeltraPlayerUtils.validFor(function(){this.play(),this._muted||defer(this.unMute.bind(this),100)}.bind(this),500))),this.redraw(),this.emit(\"exitfullscreen\")},hide:function(){this._wrapperEl&&(this._wrapperEl.style.display=\"none\")},show:function(){this._wrapperEl&&(this._wrapperEl.style.display=\"\")},destroy:function(){this._videoEngine&&(this._videoEngine.pause(),this._videoEngine.destroy(),this._controlsController&&this._controlsController.destroy());var e=function(){CeltraPlayerUtils&&this._wrapperEl&&CeltraPlayerUtils.removeElements(this._wrapperEl),this._toggleDesktopFSStateHandlers(\"remove\"),this._wrapperEl=null}.bind(this);\"undefined\"!=typeof TouchEventSimulator?defer(e,100):e(),this.emit(\"destroy\")},getDuration:function(){return this.duration},getCurrentTime:function(){return this._videoEngine?this._videoEngine.getCurrentTime():null},setCurrentTime:function(e){this._videoEngine&&this._videoEngine.setCurrentTime(e)},seekTo:function(e){this.emit(\"seekto\",e),this._seeked||(this._stateBeforeSeek=this.getState(),this.getState()===CeltraPlayerUtils.PLAYING&&this.pause()),this._seeked=!0,this._videoEngine.seekToRatio(e)}}),t.prototype._hasToBeRepeated=function(){return this._repeated touchable\" data-bind=\"wrapper\">',' ','
','
','
','
','
','
\",\"
\",' \",\"\"],extend(o.prototype,{render:function(t,n){var e,i=n.isMasterVideo?[]:[\"play\",\"replay\"];return this._container||(e={},CeltraPlayerUtils.createDom(t,o.TEMPLATE,{desktop:windows(\"10\")?\"video-controls-desktop ie-click-event\":desktop()?\"video-controls-desktop\":\"\"},this._getWrapper(e)),this._container=e.wrapper,n.isMasterVideo&&this.hide(\"outOfPlaySet\"),this._container.querySelector(\"[data-bind=progressBar]\").style.backgroundColor=n.progressbarColour,this._container.querySelector(\"[data-bind=timeBar]\").style.backgroundColor=n.progressbarColour,(t=\"undefined\"!=typeof creative?creative:window.creative)&&(e=\"MRAIDAdapter\"===t.adapter.constructor.name,\"crop\"===n.fitting&&e&&(this._container.querySelector(\"[data-bind=exitFullScreen]\").style.top=\"50px\")),i.forEach(function(t){var e,i;n[t]&&(e=n[t],i=this._getElements(t)[0],removeClass(i,\"center-button\"),addClass(i,\"custom-button\"),i.innerHTML='')}.bind(this)),this._container.addEventListener(\"tap\",this.onTapHandler)),this._container},show:function(){CeltraPlayerUtils.show.apply(null,this._getElements.apply(this,arguments))},hide:function(){CeltraPlayerUtils.hide.apply(null,this._getElements.apply(this,arguments))},showCursor:function(t){CeltraPlayerUtils.showCursor([t])},hideCursor:function(t){CeltraPlayerUtils.hideCursor([t])},setProgressBarWidth:function(t){t=Math.min(t,1),this._container&&this._container.querySelector(\"[data-bind=progressBar]\")&&(this._container.querySelector(\"[data-bind=progressBar]\").style.width=100*t+\"%\")},setTimeBarWidth:function(t){t=Math.min(t,1),this._container&&this._container.querySelector(\"[data-bind=timeBar]\")&&(this._container.querySelector(\"[data-bind=timeBar]\").style.width=100*t+\"%\")},hideAndShowWrapper:function(){this.hide(\"wrapper\"),defer(function(){this.show(\"wrapper\")}.bind(this))},disableMuteUnmuteControls:function(){this._getElements(\"mute\")[0].innerHTML=\"\",this._getElements(\"unMute\")[0].innerHTML=\"\"},pendingStateOn:function(t){addClass(this._getElements(t)[0],\"video-controls-pending\")},pendingStateOff:function(t){this._container&&removeClass(this._getElements(t)[0],\"video-controls-pending\")},addClass:function(t,e){t=this._getElements(t)[0];t&&addClass(t,e)},removeClass:function(t,e){t=this._getElements(t)[0];t&&removeClass(t,e)},orientationChange:function(t){t()},onTapHandler:function(t){t.stopPropagation();t=t.target.getAttribute(\"data-bind\");t&&this._userInteractionHandler(t)},setDTMouseMoveHandler:function(e){e.addEventListener(\"mousemove\",function(t){t.stopPropagation();t=t.target,t=t!==e?t.getAttribute(\"data-bind\"):\"vidWrapper\";this.hasMouseMoved?this.hasMouseMoved=!1:\"wrapper\"!==t&&\"vidWrapper\"!==t||this._userInteractionHandler(t,!0)}.bind(this))},_getWrapper:function(i){return function(t){var e=t.getAttribute(\"data-bind\");e&&(i[e]=t)}},_getElements:function(){if(this._container){for(var t,e=[],i=0;i touchable\" data-bind=\"wrapper\">','','Powered by Celtra
','','
\",'
\",'
\",'
\",'
\",'
\",'
\",\"
\",\"\"],s.prototype.render=function(t,i){return this._container||(this.elements={},CeltraPlayerUtils.createDom(t,s.TEMPLATE,{desktop:celtra.windows(\"10\")?\"video-controls-desktop ie-click-event\":celtra.desktop()?\"video-controls-desktop\":\"\"},this._getWrapper(this.elements)),this._container=this.elements.wrapper,i.enableVerticalVideoUIOffset&&addClass(this._container,\"vertical-UI-offset\"),i.radarBoxToEdge&&(addClass(this.elements.inner_top_left_box,\"align_to_left\"),addClass(this.elements.top_left_box,\"disable\")),i.soundBoxToEdge&&(addClass(this.elements.inner_bottom_right_box,\"align_to_right\"),addClass(this.elements.bottom_right_box,\"disable\")),\"dark\"===i.uiTheme&&addClass(this._container,\"dark-theme\"),[\"custom_play\",\"custom_replay\"].forEach(function(t){var s,e;i.customIcons&&i.customIcons[t]&&(s=i.customIcons[t],e=this._getElements(t)[0],addClass(e,\"custom-button\"),e.innerHTML='')}.bind(this)),this._container.addEventListener(\"tap\",this.onTapHandler)),this._container},s.prototype.setRadarInitialLongitude=function(t){this.elements.radar_longitude.style.transform=\"translate3d(-50%, -50%, 0) rotate(\"+(90+t)+\"deg)\"},s.prototype.setRadarOrientation=function(t){this.elements.radar_orientation.style.transform=\"translate3d(-50%, -50%, 0) rotate(\"+t+\"deg)\"},s.prototype._removeAnimationClasses=function(){removeClass(this.elements.play,\"hide\"),removeClass(this.elements.spinner,\"hide\")},s.prototype.switchToInFullscreenMode=function(){this._removeAnimationClasses(),removeClass(this.elements.topright_arrow,\"toprightANIMA\"),removeClass(this.elements.botleft_arrow,\"botleftANIMA\"),addClass(this.elements.topright_arrow,\"toprightANIMAout\"),addClass(this.elements.botleft_arrow,\"botleftANIMAout\")},s.prototype.switchToInlineMode=function(){this._removeAnimationClasses(),removeClass(this.elements.topright_arrow,\"toprightANIMAout\"),removeClass(this.elements.botleft_arrow,\"botleftANIMAout\"),addClass(this.elements.topright_arrow,\"toprightANIMA\"),addClass(this.elements.botleft_arrow,\"botleftANIMA\")},s.prototype.showMuteButton=function(){removeClass(this.elements.mute_icon,\"switch_on\"),removeClass(this.elements.mute_icon,\"switch_off\"),removeClass(this.elements.unmute_icon,\"switch_on\"),removeClass(this.elements.unmute_icon,\"switch_off\"),addClass(this.elements.mute_icon,\"switch_on\"),addClass(this.elements.unmute_icon,\"switch_off\")},s.prototype.showUnmuteButton=function(){removeClass(this.elements.mute_icon,\"switch_on\"),removeClass(this.elements.mute_icon,\"switch_off\"),removeClass(this.elements.unmute_icon,\"switch_on\"),removeClass(this.elements.unmute_icon,\"switch_off\"),addClass(this.elements.mute_icon,\"switch_off\"),addClass(this.elements.unmute_icon,\"switch_on\")},s.prototype.startCountdown=function(t,s){this._countdown||(this._countdown=CountdownProvider.create(!0,this.elements.countdown,t,\"countdown\",{countdownType:\"normal\",bgCircleColor:\"dark\"===s?\"rgba(255,255,255,1)\":\"rgba(0,0,0,.4)\",barColor:\"dark\"===s?\"rgba(0,0,0,.4)\":\"rgba(255,255,255,1)\"}),this._countdown.show())},s.prototype.updateCountdown=function(t){this._countdown&&this._countdown.setCurrentTime(t)},s.prototype.show=function(){for(var t,s=this._getElements.apply(this,arguments),e=0;e=this.fileLength-1||0=t.fileLength-1?this.emit(\"loadend\"):this.load()):this.emit(\"error\",e.status)},i.prototype._getContentRangeParts=function(e){return this.corsLengthHack?(contentLength=e.getResponseHeader(\"Content-Type\").split(\";\")[1],{receivedFrom:this.from,receivedTo:this.to,fileLength:parseInt(contentLength,10)}):(e=e.getResponseHeader(\"Content-Range\"),e=/(\\d+)-(\\d+)\\/(\\d+)$/.exec(e),{receivedFrom:parseInt(e[1],10),receivedTo:parseInt(e[2],10),fileLength:parseInt(e[3],10)})},i.prototype.destroy=function(){clearTimeout(this._requestByteHandle),this._xhr&&this._xhr.abort(),this._xhr=null},window.NetStream=i}();;\n!function(){function t(t,e){this._opts=e||{},this.buffer={writePos:0,bytes:null},this.fileLength=0,this.receivedTo=0,this.doneBuffering=!1,this.onLoad=this.onLoad.bind(this),t&&(t.on(\"data\",this.onLoad),t.on(\"loadend\",function(){this._opts.onLoadend&&this._opts.onLoadend(),this.doneBuffering=!0,this.emit(\"loadend\")}.bind(this)))}extend(t.prototype,EventEmitter),t.prototype.onLoad=function(t){var e;this.fileLength=t.fileLength,this.receivedTo=t.receivedTo,this.buffer.bytes||(e=new Uint8Array(t.fileLength),this.buffer.bytes=e.subarray(0),this.buffer.writePos=0),this.buffer.bytes.set(t.data,this.buffer.writePos),this.buffer.writePos+=t.data.byteLength,this.emit(\"data\",t)},t.prototype.getAllData=function(){0=this._buffer.duration?clearInterval(this._emitTimeUpdateInterval):this._emitTimeUpdateInterval=setInterval(this.emit.bind(this,\"timeupdate\"),250)},_decodeAudioData:function(){o.decodeAudioData(this._encodedBuffer,function(e){this._buffer=e,this._loadStatus=\"loaded\",this.emit(\"canplay\"),this.emit(\"canplaythrough\")}.bind(this))}}),Object.defineProperties(s,{paused:{get:function(){return this._paused}},ended:{get:function(){return!1}},ready:{get:function(){return\"loaded\"===this._loadStatus}},playedBefore:{get:function(){return i}},currentTime:{get:function(){return this._paused?this._pausedAt:o.currentTime-this._timeDiff},set:function(e){this._pausedAt=e,\"loaded\"!==this._loadStatus||this._paused||(this.pause(),this.playAudio(e))}}}),e.WebAudioEngine=function(e,t,i){return Object.create(s).init(e,t,!!i)}}(this);;\n!function(){this.Html5AudioEngine=function(e,t){var n,o,r;return\"undefined\"==typeof Audio?null:((n=new Audio).isUnlocked=!1,t?(n.preload=\"auto\",CeltraPlayerUtils.setMediaElementSource(document,n,e),n.start=noop):(n.preload=\"none\",n.start=function(){CeltraPlayerUtils.setMediaElementSource(document,n,e),n.start=noop}),n.ready=!1,r=function(){.3=e)&&(this._lastTriggeredTime=e),t)},_observeCuePoints:function(){this._video._player&&this._video.fireTriggers(\"videoCuepoint\",this._observe)},attach:function(){this._attached||(this._attached=!0,Ticker.frame(this._observeCuePoints,\"update\"))},detach:function(){this._attached&&(this._attached=!1,Ticker.removeFrame(this._observeCuePoints,\"update\"))},start:function(){this.attach()},stop:function(t){this.detach(),t&&(this._lastTriggeredTime=this._VIDEO_START_TIME)}};;\n!function(t){var r={name:\"Countdown\",init:function(t,e,i,s){if(this._duration=e,this._displayTime=null,this._mode=i,this._opts=s||{},this._countdownType=s.countdownType,-1===[\"kinetic\",\"countdown\"].indexOf(this._mode))throw this._mode+\" is not available as a mode for Countdown component!\";\"kinetic\"===this._mode&&(this._duration=.95*this._duration);e=\"undefined\"==typeof InstaAdUtility?celtra.isHighDensityDisplay():InstaAdUtility.isHighDensityDisplay,i=celtra.desktop()&&!e,s=celtra.desktop()&&e,e=celtra.desktop()&&celtra.gecko();switch(this._retinaFactor=i?1:s||e?2:4,this._countdownType){case\"small\":this._fontSize=0,this._size=26*this._retinaFactor,this._barWidth=2*this._retinaFactor;break;case\"normal\":this._fontSize=13*this._retinaFactor,this._size=32*this._retinaFactor,this._barWidth=2*this._retinaFactor;break;case\"big\":this._fontSize=14*this._retinaFactor,this._size=40*this._retinaFactor,this._barWidth=2.5*this._retinaFactor}return this._halfSize=this._size/2,this._barColor=this._opts.barColor||\"rgba(255, 255, 255, 1)\",this._bgCircleColor=this._opts.bgCircleColor||\"rgba(0, 0, 0, 0.08)\",this._circ=2*Math.PI,this._quart=Math.PI/2,this._radius=.5*this._size,this._radiusCountdown=.5*(this._size-4*this._barWidth),this._barPercentage=0,this._kineticBarSpeed=.01,this._introTransitionEnabled=this._opts.introTransitionEnabled||!1,this._opacity=null,this.node=t.appendChild(this._createCountdown()),this._offscreenCanvas=document.createElement(\"canvas\"),this._offscreenContext=this._offscreenCanvas.getContext(\"2d\"),this._state=new StateObject({show:null}),this._time=new StateObject({currentTime:0}),this._update=this._update.bind(this),this._render=this._render.bind(this),Ticker.frame(this._update,\"update\"),Ticker.frame(this._render,\"render\"),this.setCurrentTime(0),this},destroy:function(){Ticker.removeFrame(this._update,\"update\"),Ticker.removeFrame(this._render,\"render\"),this._offscreenCanvas=null,this._offscreenContext=null,this._prebufferedBg=null},_createCountdown:function(){var t=document.createElement(\"div\"),e=document.createElement(\"canvas\"),i=document.createElement(\"div\"),e=(this._text=document.createElement(\"div\"),this._ctx=e.getContext(\"2d\"),addClass(t,\"celtra-countdown\"),this._opts.cssClass&&addClass(t,this._opts.cssClass),\"kinetic\"===this._mode&&addClass(t,\"quick-transition\"),addClass(e,\"celtra-countdown-canvas\"),addClass(i,\"celtra-countdown-text-wrapper\"),i.style.fontSize=this._fontSize+\"px\",e.setAttribute(\"width\",this._size+\"px\"),e.setAttribute(\"height\",this._size+\"px\"),t.appendChild(e),i.style.color=this._barColor,i.style.width=this._size+\"px\",i.style.height=this._size+\"px\",\"scale(\"+1/this._retinaFactor+\")\");return t.style.transform=e,t.style.webkitTransform=e,t.appendChild(i),i.appendChild(this._text),t},show:function(){this._state.show=!0},hide:function(){this._state.show=!1},_update:function(){var t,e;this._barPercentage=this._time.currentTime/this._duration,this._state.show&&this._time.isDirty()&&(this._time.markClean(),this._offscreenContext.clearRect(0,0,this._size,this._size),this._prebufferedBg||(this._offscreenContext.beginPath(),this._offscreenContext.arc(this._halfSize,this._halfSize,this._radius,0,this._circ),this._offscreenContext.fillStyle=this._bgCircleColor,this._offscreenContext.fill(),this._offscreenContext.beginPath(),this._offscreenContext.strokeStyle=this._barColor,this._offscreenContext.lineCap=\"square\",this._offscreenContext.closePath(),this._offscreenContext.fill(),this._offscreenContext.lineWidth=this._barWidth,this._prebufferedBg=this._offscreenContext.getImageData(0,0,this._size,this._size)),t=-this._quart,e=this._circ*(1-this._barPercentage)-this._quart,0===this._barPercentage?e=t=0:1<=this._barPercentage&&(t=0,e=2*Math.PI),this._offscreenContext.putImageData(this._prebufferedBg,0,0),this._offscreenContext.beginPath(),t!==e&&this._offscreenContext.arc(this._halfSize,this._halfSize,this._radiusCountdown,t,e,!0),this._offscreenContext.stroke())},_render:function(){var t;this._introTransitionEnabled&&this._opacity&&this._state.show&&(this.node.style.opacity=this._opacity+.2),this._state.isDirty()&&(this._state.show?(removeClass(this.node,\"celtra-hide\"),this._introTransitionEnabled||addClass(this.node,\"celtra-show\")):(this._introTransitionEnabled&&this._opacity&&(this.node.style.opacity=0,this._introTransitionEnabled=!1),removeClass(this.node,\"celtra-show\"),addClass(this.node,\"celtra-hide\")),this._state.markClean()),this._state.show&&(this._ctx.clearRect(0,0,this._size,this._size),this._ctx.drawImage(this._offscreenCanvas,0,0),\"countdown\"===this._mode&&(t=Math.round(this._time.currentTime/1e3),this._displayTime!==t&&(this._displayTime=t,this._text.innerText=this._displayTime)))},setOpacity:function(t){this._opacity=t},setCurrentTime:function(t){if(\"countdown\"===this._mode){if(t=this._duration-t,this._duration<=0)return;this._time.currentTime=t=t<150?0:t}\"kinetic\"===this._mode&&(this._time.currentTime=t)}};t.CountdownProvider={create:function(t,e,i,s,n){return t?Object.create(r).init(e,i,s,n):{show:noop,hide:noop,setCurrentTime:noop,destroy:noop}}}}(this);;\nfunction Creative(e,t,r,n,i,a,o,s,u,c,d,m,p){if(e instanceof Creative)throw\"This JSON has already been unfreezed. We do it inline, to improve performance. Duplicate it yourself before unfreezing, if you need to use it again.\";var f=p.start(\"Creative.new\"),s=extend({adapter:a,runtimeParams:t||{},urlOpenedOverrideUrls:s,urlOpenedUrlAppendage:d,clickThroughDestinationUrl:m,storeOpenedOverrideUrls:u,macros:c},o),d=p.start(\"Creative.unfreeze\");return e=Freezer.unfreeze(e,window,s),d.end(),e.instantiation=randInt(),e.batcher=new Batcher({protoLoading:a.protoLoading}),e.trackingCenter=r,e.universalInteractionId=\"\",e.aggregatorTracking=n,e.experiments=i,e.perf=p,e.platformAdvId=t.platformAdvId,e.platformAdvIdTrackingLimited=t.platformAdvIdTrackingLimited,null!=a&&(a.openBrowserSameWindowInHostileIFrame=function(e){window.top.location.href=e}),f.end(),e}Creative.toString=function(){return\"[Clazz Creative]\"},Creative.prototype.toString=function(){return\"[Creative \"+this.name+\"]\"},window.creative=null,extend(Creative.prototype,EventEmitter),Creative.init=function(e,t,r,n,i,a,o,s,u,c,d,m,p){if(window.creative)throw\"creative is a singleton and was already initialized.\";Logger.initFromRuntimeParams(t),window.creative=new Creative(e,t,r,n,i,a,o,s,u,c,d,m,p)},Creative.prototype.userInteracted=function(e){this.emit(\"interaction\",e)},Creative.prototype.clickedThrough=function(e){this.emit(\"clickThrough\",e)},Creative.prototype._getRuntimeParamsWithPrefix=function(e){var t,r={};for(t in this.runtimeParams)0===t.indexOf(e)&&(r[t.slice(e.length)]=this.runtimeParams[t]);return r},Object.defineProperties(Creative.prototype,{sessionId:{enumerable:!0,get:function(){return this.runtimeParams.sessionId}},placementId:{enumerable:!0,get:function(){return this.runtimeParams.placementId||null}},folderId:{enumerable:!0,get:function(){return this.runtimeParams.folderId}},supplierId:{enumerable:!0,get:function(){return this.runtimeParams.supplierId||null}},secure:{enumerable:!0,get:function(){return 1==this.runtimeParams.secure}},userParams:{enumerable:!0,get:function(){return this._getRuntimeParamsWithPrefix(\"user.\")}},userIdentifiers:{enumerable:!0,get:function(){return this.runtimeParams.userIdentifiers}},authTokenUrlParam:{enumerable:!1,get:function(){return\"authBasis=\"+creative.runtimeParams.authBasis+\"&authToken=\"+creative.runtimeParams.authToken}},customAudiences:{enumerable:!0,get:function(){return function(t){if(creative.runtimeParams.customAudiences[t])return{userExists:creative.runtimeParams.customAudiences[t].userExists,userData:creative.runtimeParams.customAudiences[t].userData,addUser:function(e){return CustomAudiences.addUser(t,e)},removeUser:function(){return CustomAudiences.removeUser(t)}};throw new Error('Custom audience \"'+t+'\" is not used by the creative.')}}},acceptLanguage:{enumerable:!0,get:function(){return this.runtimeParams.acceptLanguage}}}),Creative.prototype.awake=function(){function o(e,t,r,n){e.forEach(function(e){e.parentUnit=n,e.parentScreen=r,e.parentContainer=t})}for(var e in this.units){var t=this.units[e],r=(t.name=e,[]);t.variants?t.variants.forEach(function(e){r=r.concat(e.master,e.screens),e.loadingScreen&&(r=[e.loadingScreen].concat(r))}):(r=[t.master].concat(t.screens),t.loadingScreen&&(r=[t.loadingScreen].concat(r))),r.forEach(function(e){e.parentUnit=t,function r(e,n,i,a){e.forEach(function(t){t.parentUnit=a,t.parentScreen=i,t.parentContainer=n,t.getNestedContainers().forEach(function(e){e.parentUnit=a,e.parentScreen=i,e.parentObject=t,r(e.objects,e,i,a),e.scenes&&o(e.scenes,e,i,a)})})}(e.objects,e,e,t),e.scenes&&o(e.scenes,e,e,t)})}},Creative.prototype.track=function(e,t){0<=[\"firstInteraction\",\"interaction\",\"endCardInteraction\",\"unitCollapsed\",\"creativeDismissed\",\"clickThroughDestinationOpened\",\"firstClickThrough\",\"itemSwiped\"].indexOf(e.name)&&(e=extend(e,{universalInteractionId:this.universalInteractionId})),this.trackingCenter.track(e,t)},Creative.prototype.setUniversalInteractionId=function(e){this.universalInteractionId=e},Creative.prototype.wrapRedirectPageUrl=function(e,t){return this.trackingCenter.wrapRedirectPageUrl(e,t)},Object.defineProperty(Creative.prototype,\"sdk\",{get:function(){return this.adapter},enumerable:!0}),Creative._throw=function(e){throw e},Creative.prototype.getUserInteracted=function(){return 1==this.runtimeParams.userInteracted},Creative.prototype.trackCreativeRendered=function(){creative.adapter.notifycreativeRendered(),this._getCreativeRendered()||(this.track({name:\"creativeRendered\"}),this.runtimeParams.creativeRendered=1,defer(this.trackingCenter.batchFlush))},Creative.prototype._getCreativeRendered=function(){return 1===this.runtimeParams.creativeRendered},Creative.prototype.trackCreativeRenderedOnScreenShow=Creative.prototype.trackCreativeRendered,Creative.prototype.trackCreativeRenderedOnVideoStart=noop,Creative.trackCustomEventAction=function(e,t,r){e.track({name:\"custom\",label:t.name}),creative.adapter.sendToEventMonitor(\"custom\",t.triggerId,e.screen.name,null,t.name,e.initiatedBeforeScreenShown()),r&&r()},Creative.prototype.trackCreativeLoaded=function(e){this.track({name:\"creativeLoaded\",viewability00Measurable:e.observingViewability(\"00\"),viewability501Measurable:e.observingViewability(\"501\"),viewableTimeMeasurable:e.observingViewableTime(),cdnVariant:this.runtimeParams.variantChoices.CdnTiming||\"none\"}),defer(this.trackingCenter.batchFlush),this.perf._stopTrackingDefers=!0,this.perf.mark(\"creativeLoaded\")},Creative.prototype.createUserLocation=function(e){if(\"undefined\"!=typeof UserLocation)return new UserLocation({lat:this.runtimeParams.gpsLat,lng:this.runtimeParams.gpsLng},e)},Creative.prototype.getPageUrl=function(e){return(this.secure?this.creativeUrl:this.insecureCreativeUrl)+e+\"?base64json=\"+encodeURIComponent(btoa(to_utf8(JSON.stringify(this.runtimeParams))))},Creative.prototype.shouldClickThroughToNewWindow=function(e){var t=0<=[\"same\",\"new\"].indexOf(this.runtimeParams.preferredClickThroughWindow)?this.runtimeParams.preferredClickThroughWindow:\"new\",e=(creative&&creative.adapter.nesting.hostileIframe&&(t=\"new\"),e&&e.inUserInitiatedIteration),r=deviceInfo.os.android()&&deviceInfo.browser.facebookApp();return\"new\"==t&&e&&!r},Creative.prototype.getFeedFields=function(){return FeedData.getCustomFields()},Creative.prototype.getFeedFieldByName=function(e){return FeedData.getCustomFieldByName(e)},Creative.prototype.getAllFeedFieldsByName=function(t){return FeedData.getCustomFields().filter(function(e){return e.name===t})};;\nfunction Banner(){}inherit(Banner,Creative),Banner.toString=function(){return\"[Clazz Banner]\"},Banner.prototype.toString=function(){return\"[Banner \"+this.name+\"]\"},Banner.prototype.awake=function(){Banner.uber.awake.apply(this,arguments),this.adapter.wrapRedirectPageUrl=this.wrapRedirectPageUrl.bind(this),this.units.banner.dismissAction=function(n,e,t){n.track({name:\"creativeDismissed\"}),creative.adapter.dismiss(t,e)}.bind(this),this.units.banner.trackCreativeDismissed=function(){new ActionContext(this.visibleScreen).track({name:\"creativeDismissed\"})},this.units.banner.userLocation=this.createUserLocation(!1)};;\nvar Kernel={toString:function(){return\"[Clazz Kernel]\"},runInParallelAction:function(t,e,n){e.actions.waitForEach(function(e,n){e(t,n)},n)}};Kernel.runInParallelActionDryRun=Kernel.runInParallelAction,Kernel.runInBackgroundAction=function(e,n,t){n.action&&n.action(e,noop),t()},Kernel.runInSequenceAction=function(t,e,n){for(var r=n,i=e.actions.length-1;0<=i;i--)r=function(e,n){return function(){n(t,e)}}(r,e.actions[i]);r()},Kernel.runInSequenceActionDryRun=Kernel.runInSequenceAction,Kernel.runNTimesAction=function(e,n,t){n.caller.hasOwnProperty(\"executionsLeft\")||(n.caller.executionsLeft=n.repeat),0=n.startKeyframe,s=e<=n.endKeyframe||!n.firstFrameAnimated,r=this._lastUpdateObjectsProgress>n.startKeyframe&&en.endKeyframe,r=this._isReactiveScene&&(r||o);if(a&&s||this.fallbackFrameShown||r)n.firstFrameAnimated=!0,hasClass(i.node,\"animated\")||addClass(i.node,\"animated\");else{if(!hasClass(i.node,\"animated\"))continue;removeClass(i.node,\"animated\")}}o=this._keyframeAnimations[i.localId].animation.getValuesAt(e);Scene._updateLayoutWithValues(i.layoutCurrent,o,this._objectVisibilityStates[t]),i._keyframeStyle=this._calculateKeyframeStyleAttributes(i)}}this._lastUpdateObjectsProgress=e},Scene.prototype.renderObjects=function(){for(var e in this._claimedObjects){var t=this._claimedObjects[e];t.node&&((e=this._objectVisibilityStates[e]).isDirty(\"transition\")&&(\"show\"===e.transition?t.showAction(null,{},noop):\"hide\"===e.transition&&t.hideAction(null,{},noop),e.markClean(\"transition\")),t._applyStyles(t.node,t._keyframeStyle),t.redrawSceneLayout())}},Scene.prototype.getPlayer=function(){return this._player},Scene.prototype.claimObject=function(e){if(-1===this._claimedObjects.indexOf(e)){for(var t=0;ti&&(t.sortIndex+=2e3),t.minSize.height>n&&(t.sortIndex+=2e3),t.sortIndex+=Math.abs(t.minSize.width-i)+Math.abs(t.minSize.height-n)}),t.sort(function(t,e){return t.sortIndex-e.sortIndex}),this.layoutCurrentIndex=this.layouts.indexOf(t[0]),o!=this.layoutCurrentIndex&&this.emit(\"layoutChanged\")},CreativeUnit.prototype.enterRenderTree=function(){var t;this._isRendering||(this._isRendering=!0,t=this.getAvailableSize(),this.updateWindowMetrics(this._getOrientation(),t.width,t.height),this.master&&(this.master.loaded?defer(this.master.enterRenderTree.bind(this.master),void 0,void 0,useAsap()):this.once(\"_firstScreenLoaded\",this.master.enterRenderTree.bind(this.master))),this.visibleScreen&&defer(this.visibleScreen.enterRenderTree.bind(this.visibleScreen),void 0,void 0,useAsap()),this.hacks.triggerBlurWhenTappingOutsideOfInputs&&(attach(this.node,\"touchstart\",function(t){-1==[\"INPUT\",\"TEXTAREA\",\"SELECT\"].indexOf(t.target.nodeName)&&null!=this.lastInputElementFocused&&this.lastInputElementFocused.blur()}.bind(this),!0),attach(this.node,\"focus\",function(t){-1<[\"INPUT\",\"TEXTAREA\",\"SELECT\"].indexOf(t.target.nodeName)&&(this.lastInputElementFocused=t.target)}.bind(this),!0),attach(this.node,\"blur\",function(t){-1<[\"INPUT\",\"TEXTAREA\",\"SELECT\"].indexOf(t.target.nodeName)&&(this.lastInputElementFocused=null)}.bind(this),!0)))},CreativeUnit.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.master&&this.master.exitRenderTree(),this.visibleScreen&&this.visibleScreen.exitRenderTree())},CreativeUnit.prototype._appear=function(){this.loaded||Creative._throw(\"Cannot show the unit before it has finished loading.\"),this.isAppearing&&Creative._throw(\"The unit is already appearing.\"),this.node.parentNode||Creative._throw(\"Creative unit must be added to DOM before show() is called. Animations will start on show().\"),Logger(\"unit\").log(\"Showing \"+this),this.inView&&(this.inView.start(),this.currentScreen&&this.currentScreen.inView&&this.currentScreen.inView.start()),this.hasAppearedAtLeastOnce||(this.placeboBar&&this.placeboBar.start(),this.orientationLockIsOn?this._emitUnitFirstShownAfterOrientationPrompt=!0:this.emit(\"_unitFirstShown\"))},CreativeUnit.prototype._disappear=function(){this.isAppearing||Creative._throw(\"The unit is not appearing, can not disappear.\"),Logger(\"unit\").log(\"Hiding \"+this),this.inView&&this.inView.stop()},CreativeUnit.prototype.createNode=function(){var i,n,t=this.unitDiv=CreativeUnit.uber.createNode.call(this),e=(t.id=\"celtra-\"+this.name.replace(/[A-Z]/g,function(t){return\"-\"+t.toLowerCase()}),Color.isGradient(this.backgroundColor)?addCssRule(\"#\"+t.id,Color.createGradientStyle(this.backgroundColor)):t.style.backgroundColor=this.backgroundColor,t.style.overflow=this.master.showOverflow?\"visible\":\"hidden\",this.screenContainer=document.createElement(\"div\"),this.screenContainer.className=\"celtra-screen-container\",this.screenContainer.style.position=\"absolute\",t.appendChild(this.screenContainer),this.screenHolder=document.createElement(\"div\"),this.screenHolder.className=\"celtra-screen-holder\",this.screenHolder.style.width=\"100%\",this.screenHolder.style.height=\"100%\",this.screenContainer.appendChild(this.screenHolder),this.borderColor&&0=e.duration,t.shakeTimeout=setTimeout(function(){delete t.shakeStartTime,t.triggered=!1},500),e&&!t.triggered&&(t.triggered=i=!0),i)}.bind(this),null,e))},Screen.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.emit(\"enteredRenderTree\"))},Screen.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.emit(\"exitedRenderTree\"))},Screen.prototype._updateSize=function(){this.emit(\"resize\")},Screen.prototype.finishedLoading=function(){Screen.uber.finishedLoading.call(this),Logger(\"unit\").log(\"Finished loading \"+this)},Screen.prototype.triggerBeforeAppear=function(e){var t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&!this.appearedAtLeastOnce&&(this.isFirstScreen()||this.isMasterScreen())});this.fireTriggers(\"beforeAppear\",null,e,t)},Screen.prototype.triggerOrientationChange=function(e){this.fireTriggers(\"orientationChange\",null,e)},Screen.prototype.getMaxZIndex=function(){var t=0;return this.objects.forEach(function(e){e.zIndex>t&&(t=e.zIndex)}),t},Screen.prototype.inViewTriggerSetup=function(){var t=!1,i=creative&&creative.adapter&&creative.adapter.adBehavior.subpixelScrollable;this.triggers.forEach(function(e){i&&\"enterView\"===e.type&&e.parameters&&100==e.parameters.area&&(e.parameters.area=99.9),\"enterView\"!==e.type&&\"leaveView\"!==e.type||(t=!0,this.inViewAreaRatio=0)},this),t&&this.inView.on(\"areaInViewRatioChanged\",this.triggerInView.bind(this))},Screen.prototype.triggerInView=function(e){var t=new ActionContext(this),i=\"enterView\",n=this.inViewAreaRatio,r=e,a=function(e,t){return e.parameters.area-t.parameters.area};e=t.length;return t&&a.ifNotClosing(\"swipe\",n,n.trackUserInteraction),t},null,n)}})),attach(i,\"transitionend\",function(t){t.stopPropagation()},!1),this.disableComponentRedrawOnEvent||this.parentContainer.on(\"resize\",this._refreshDisplayState),this.parentContainer.on(\"enteredRenderTree\",function(){this.hidden||this.enterRenderTree()}.bind(this)),this.parentContainer.on(\"exitedRenderTree\",function(){this.hidden||this.exitRenderTree()}.bind(this)),this.layoutPrevious=this.layoutCurrent,this.disableComponentRedrawOnEvent||this.parentUnit.on(\"layoutChanged\",this.handleLayoutChanged.bind(this)),this.initClickPrevention(function(){return this.node}.bind(this)),this._applyStyles(i,this._calculateNewStyleAttributes()),this.positionUsingTransforms()||deviceInfo.browser.safari(\"9.0.0\",null)||(i.style.outline=\"1px solid transparent\"),this._rxListeners=[],i},ScreenObject.prototype.positionUsingTransforms=retFalse,ScreenObject.prototype.sizeUsingTransforms=retFalse,ScreenObject.prototype.isValid=retTrue,ScreenObject.prototype.getNaturalSize=function(){return this.originalSize},ScreenObject.prototype._scaleNaturalSize=function(t,e){return t},ScreenObject.prototype._calculateNewStyleAttributes=function(){var t={transform:\"\",transformOrigin:\"50% 50%\"},e=this._scaleNaturalSize(this.getNaturalSize(),this.size),i=this.position.x,n=this.position.y;return this.sizeUsingTransforms()&&(i+=ScreenObject._roundIfNeeded((this.size.width-e.width)/2),n+=ScreenObject._roundIfNeeded((this.size.height-e.height)/2)),this.positionUsingTransforms()?(t.left=\"0\",t.top=\"0\",(i||n)&&(t.transform+=ScreenObject.getCSSTranslate(i,n))):(t.left=i+\"px\",t.top=n+\"px\"),!this.isAnimated&&0==this.rotation||(t.transform+=\" rotate(\"+this.rotation+\"deg) \"),this.sizeUsingTransforms()?(t.width=e.width+\"px\",t.height=e.height+\"px\",i=this.size.width/e.width,n=this.size.height/e.height,t.transform+=\" scale(\"+i+\", \"+n+\")\"):(t.width=this.size.width+\"px\",t.height=this.size.height+\"px\"),t.zIndex=this.zIndex,t.opacity=this.opacity,this.hidden?t.display=\"none\":t.display=\"block\",t},ScreenObject.prototype._applyStyles=function(e,i){i&&Object.keys(i).forEach(function(t){celtra.styler.css(e,t,i[t])})},ScreenObject.prototype._refreshDisplayState=function(){if(this.node){var t,e=this._calculateNewStyleAttributes(),i=!1;for(t in e){var n=String(e[t]).replace(/^\\s*|\\s*$/g,\"\"),r=celtra.styler.css(this.node,t);celtra.styler.css(this.node,t)!==n&&r!=n&&\"zIndex\"!=t&&\"display\"!=t&&(i=!0)}return this._applyStyles(this.node,e),this.redrawLayout(),i}},ScreenObject.prototype.finishAnimation=function(){this.node&&void 0!==celtra.styler.css(this.node,\"transitionDuration\")&&(celtra.styler.css(this.node,\"transitionDuration\",\"1ms\"),this.node.offsetWidth,celtra.styler.css(this.node,\"transitionDuration\",\"\"))},ScreenObject.prototype.handleLayoutChanged=function(){var t=function(){this.layoutPrevious.hidden&&!this.layoutCurrent.hidden?this.enterRenderTreeAndAppear(!0):!this.layoutPrevious.hidden&&this.layoutCurrent.hidden&&this.parentContainer._isRendering&&this.exitRenderTree(),this.layoutPrevious=this.layoutCurrent}.bind(this);ios()?defer(t):t(),this.finishAnimation(),this._refreshDisplayState()},ScreenObject.prototype.redrawLayout=function(){},ScreenObject.prototype.redrawSceneLayout=function(){this.redrawLayout()},ScreenObject.prototype._checkAndEnhanceParamsForFileLoading=function(t,e,i){t=ScreenObject.uber._checkAndEnhanceParamsForFileLoading.call(this,t,e,i);return t.settings.creativeUnitVariantId=this.parentScreen.parentContainer.localId,t},ScreenObject.prototype._preloadImage=function(t,e,i){e=this._checkAndEnhanceParamsForFileLoading(t,e,i);ScreenObject.uber._preloadImage.call(this,t,e.settings,e.callback)},ScreenObject.prototype._loadImage=function(t,e,i){e=this._checkAndEnhanceParamsForFileLoading(t,e,i);ScreenObject.uber._loadImage.call(this,t,e.settings,e.callback)},ScreenObject.prototype.setPosition=function(t,e){this.position={left:t+\"px\",top:e+\"px\"},this._refreshDisplayState()},ScreenObject.prototype.getPosition=function(){return{x:this.position.x,y:this.position.y}},ScreenObject.prototype.setSize=function(t,e){this.size.width=t,this.size.height=e,this._refreshDisplayState()},ScreenObject.prototype.getSize=function(){return{width:this.size.width,height:this.size.height}},ScreenObject.prototype.setOpacity=function(t){this.opacity=t,this._refreshDisplayState()},ScreenObject.prototype.getOpacity=function(){return this.opacity},ScreenObject.prototype.animateAction=function(t,e,i){i=i||noop,this.isAnimated=!0;var n=void 0!==e.duration?e.duration:1e3,r=e.timingFunction||\"linear\";function o(t){return!isNaN(parseFloat(t))&&isFinite(t)}function s(t){var e={position:{},size:{width:null,height:null},zIndex:null,opacity:null,rotation:null};return deep(e,t),e}function a(t,e){var i=e.size,n=t.size,r=(null==i.width&&(i.width=n.width),null==i.height&&(i.height=n.height),t.size=i,t.position),o=e.position,s=null,a=null,c=null,h=null;[\"left\",\"right\",\"hcenter\"].forEach(function(t){t in r&&(s=t),t in o&&(c=t)}),[\"bottom\",\"top\",\"vcenter\"].forEach(function(t){t in r&&(a=t),t in o&&(h=t)}),c&&null!==o[c]&&(delete r[s],r[c]=o[c]),h&&null!==o[h]&&(delete r[a],r[h]=o[h]),null!=e.rotation&&(t.rotation=e.rotation),null!=e.opacity&&(t.opacity=e.opacity),null!=e.zIndex&&(t.zIndex=e.zIndex)}e.layoutSpecificValues?e.layoutSpecificValues.forEach(function(t,e){this.layoutSpecificValues[e]&&a(this.layoutSpecificValues[e],s(t))}.bind(this)):(null!=(e=s(e.properties)).position.x&&(e.position.left=e.position.x+\"px\"),null!=e.position.y&&(e.position.top=e.position.y+\"px\"),null!=e.zIndex&&(e.zIndex=e.zIndex+ScreenObject._zIndexOffset,this.zIndex=e.zIndex),null!=e.size.width&&o(e.size.width)&&(e.size.width+=\"px\"),null!=e.size.height&&o(e.size.height)&&(e.size.height+=\"px\"),a(this.layoutCurrent,e));var c,h,u,l=this.node,e=(celtra.styler.css(l,\"transition\",\"\"),celtra.styler.css(l,\"transitionProperty\",\"all\"),celtra.styler.css(l,\"transitionDuration\",n+\"ms\"),celtra.styler.css(l,\"transitionTimingFunction\",r),this._refreshDisplayState());function p(){flash(),Date.now()<%= rules[i].selector %> { <%= rules[i].attributes %> }\\n<% } %>\"),ScreenObject.prototype.css=function(e,i){void 0===i&&(i=e,e=this.getNode()),Object.keys(i).forEach(function(t){celtra.styler.css(e,t,i[t])})},ScreenObject.prototype.getNestedContainers=function(){return[]},ScreenObject.prototype.getActiveContainers=function(){return this.getNestedContainers()};;\nfunction Hotspot(){}inherit(Hotspot,ScreenObject),Hotspot.toString=function(){return\"[Clazz Hotspot]\"},Hotspot.prototype.toString=function(){return\"[Hotspot \"+this.localId+\"]\"},Hotspot.prototype.createNode=function(){var t=Hotspot.uber.createNode.call(this);return addClass(t,\"touchable\"),attach(t,\"tap\",this.handleTap),t},Hotspot.prototype.handleTap=function(t){t.stopPropagation()};;\nvar composeUrl=CeltraPlayerUtils.composeUrl,isTruthy=CeltraPlayerUtils.isTruthy,getUrl=CeltraPlayerUtils.getUrl,ifDefined=CeltraPlayerUtils.ifDefined,minVideoSize={width:50,height:50};function Video(){}inherit(Video,ScreenObject),Video.toString=function(){return\"[Clazz Video]\"},Video.prototype.toString=function(){return\"[Video \"+this.localId+\"]\"},Video.prototype.transcodingGroup=\"inline\",Video.TRANSCODING_IN_PROGRESS=\"We\u2019re processing this video. After a few moments, please refresh your browser.\",Video.TRANSCODING_ERROR=\"Transcoding failed. Try uploading a different video or contact support.\",Video.AUTOPLAY_REJECTED=\"Please enable Allow All Auto-Play in your Safari Preferences to preview this creative.\",Video.SIZE_PROPERTY_STEP_MULTIPLIER=100,Video.prototype.awake=function(){Video.uber.awake.call(this),this._player=null,this._spec=null,this.posterImageSource=null,this.posterDisabled=!1,this._externalEngineProvided=null,this._customUrlParameters={},this._inViewAreaRatio=0,this._delayVideoAutoplay=!0,this._fallbackToMPEG1=!1,this._viewabilityStartTriggerRatio=.05,this._viewabilityPauseTriggerRatio=.05,this.isTeaser=\"teaser\"===this.purpose,this.fullscreenMode=this.fullscreenButton?\"both\":\"disabled\",this.isConsideredInView=!1,this.isUserEngaged=!1,this._handleAreaInViewRatioChanged=this._handleAreaInViewRatioChanged.bind(this),this._handleContainerViewableChange=this._handleContainerViewableChange.bind(this),this._handleSkinViewportChangeTimeout=null,this._handleAreaCoveredOrAreaInViewRatioChanged=this._handleAreaCoveredOrAreaInViewRatioChanged.bind(this),this._handleAreaCoveredOrAreaInViewRatioChangedThrottled=this._handleAreaCoveredOrAreaInViewRatioChangedThrottled.bind(this),this._handleStopRequest=this._handleStopRequest.bind(this),this._originalVideo=this.video},Video.prototype.redrawLayout=function(){this._player&&this._player.setDimensions(this._round(this.size.width),this._round(this.size.height))},Video.prototype.createNode=function(){\"string\"==typeof this.posterImageFeedFieldKey&&FeedData.checkAndTrackValue(this.posterImageFeedFieldKey,this.posterImageFeedRowIndex,this.constructor.name,\"posterImageFeedFieldKey\"),\"string\"==typeof this.videoSourceFeedFieldKey&&(FeedData.checkAndTrackValue(this.videoSourceFeedFieldKey,this.videoSourceFeedRowIndex,this.constructor.name,\"videoSourceFeedFieldKey\"),this.video=null,FeedData.isCorrectFieldType(this.videoSourceFeedFieldKey,this.constructor.name,\"videoSourceFeedFieldKey\")&&(i=FeedData.getFieldRowByKey(this.videoSourceFeedFieldKey,this.videoSourceFeedRowIndex))&&\"string\"==typeof i.value&&(this.video=new File,this.video.blobHash=i.value,this.video.meta=i.metadata&&i.metadata.video?i.metadata.video:{hasAudio:!0}));var e,t,i=Video.uber.createNode.call(this);return this._isSnapchatFormat=!!creative.constructor.name.match(/^Snapchat.*/),this._isDesktop=deviceInfo.deviceType.desktop()&&\"Desktop\"===creative.intendedDeviceType,this.posterDisabled=this.posterDisabled||isTruthy(creative.runtimeParams.disablePoster),this._isSnapchatFormat&&(this.transcodingGroup=\"snapchat\"),this._initializeCustomStartStopRatios(),this.on(\"enteredRenderTree\",function(){this._createPlayer()}.bind(this)),this.on(\"exitedRenderTree\",this._exitedRenderTree.bind(this)),this.video&&!this.isTeaser&&this._hasPosterImage()&&!this.posterDisabled&&(e={crossOrigin:\"anonymous\"},\"responsive\"!=this.parentUnit.sizing||this._isSnapchatFormat?(t=this._getPosterUrl())&&this._preloadImage(new File(t),e,function(e){this.posterImageSource=e}.bind(this)):this.parentScreen.on(\"appeared\",function(){this._loadImage(new File(this._getPosterUrl(),e))}.bind(this))),addClass(i,\"touchable\"),attach(i,\"tap\",this.handleTap),creative.adapter.on(\"stateChange\",function(e){this._player&&(\"dismissed\"==e&&this.emit(\"ended\"),\"default\"==e&&this.isTeaser&&this.playAction(new ActionContext(this,!1)))}.bind(this)),creative.adapter.on(\"orientationchange\",function(e){this._player&&this._player.redraw(),setTimeout(function(){this._player&&this._player.redraw()}.bind(this),800)}.bind(this)),creative.adapter.on(\"resize\",function(){this._player&&this._player.redraw()}.bind(this)),i},Object.defineProperty(Video.prototype,\"isTrackable\",{get:function(){return!0}}),Video.prototype._leaveView=function(){var e=this._player&&this._player.isState(CeltraPlayerUtils.PLAYING),t=this._player&&this._player.isState(CeltraPlayerUtils.BUFFERING);this.playWhenInView=e||t||this.playWhenInView,(e||t)&&this._player.pause()},Video.prototype._comeInView=function(){this._player&&this.playWhenInView&&(this._player.play(),this.playWhenInView=!1)},Video.prototype._initializeCustomStartStopRatios=function(){var e=parseFloat(creative.runtimeParams.viewabilityStartTriggerRatio),t=parseFloat(creative.runtimeParams.viewabilityPauseTriggerRatio),i=parseFloat(this.viewabilityStartTriggerRatio)/100,a=parseFloat(this.viewabilityPauseTriggerRatio)/100,n=null,s=null;0<=e&&e<=1&&0<=t&&t<=1?(n=e,s=t):0<=i&&i<=1&&0<=a&&a<=1&&(n=i,s=a),n&&n<=1&&0<=n&&(this._viewabilityStartTriggerRatio=n=.95<=n?.95:n),s&&s<=1&&0<=s&&(this._viewabilityPauseTriggerRatio=s=.95<=s?.95:s)},Video.prototype._getVideoControlsController=function(e){var a,n;return this.isTeaser||e.campaignExplorer&&!e.massProductionPreview?null:(a=isTruthy(creative.runtimeParams.enableVerticalVideoUIOffset),n=function(e){return new VideoControls(e)},function(e,t){var i=\"never\"===this.controlsMode,e=new VideoControlsController(e,n,extend({autohideTime:\"hide\"===this.controlsMode?3:0,showPlayIconAsFallback:!0,playIconEnabled:!this.autoplay,hasTapTriggers:this.hasTriggers(\"tap\"),tapCallback:function(){var e=new ActionContext(this,!0);this.ifNotClosing(\"tap\",e,e.trackUserInteraction),this.fireTriggers(\"tap\",null,null,e)}.bind(this),loaderIconEnabled:void 0===this.loader||this.loader,countdownIconEnabled:this.countdown&&!i,resumeIconEnabled:void 0===this.resumeButton||this.resumeButton,replayIconEnabled:!0,fullscreenIconEnabled:\"both\"===this.fullscreenMode&&!i,soundIconEnabled:this.video.meta.hasAudio&&!i,customIcons:{custom_play:this.playIcon||null,custom_replay:this.replayIcon||null},vignetteEnabled:!1,celtraSignatureEnabled:!1,introAnimationEnabled:!1,radarIconEnabled:!1,enableVerticalVideoUIOffset:a},t));return e.on(\"playButtonPressed\",function(){this.playAction(new ActionContext(this,{consideredUserInitiatedByBrowser:!0}))}.bind(this)),e}.bind(this))},Video.prototype._showFullscreenButton=function(){return deviceInfo.deviceType.desktop()||ifDefined(this.parentUnit.fillsContainer,!1)},Video.prototype._getPosterUrl=function(){var e,t,i;return\"string\"==typeof this.posterImageFeedFieldKey?\"string\"==typeof(i=FeedData.getFieldValueByKey(this.posterImageFeedFieldKey,this.posterImageFeedRowIndex))&&FeedData.isCorrectFieldType(this.posterImageFeedFieldKey,this.constructor.name,\"posterImageFeedFieldKey\")?i:null:this.posterImage?this.posterImage.getUrl():this.posterImageSource&&!this.video.useRaw?this.posterImageSource.src:this.video&&this.video.blobHash?(i={width:this.size.width,height:this.size.height},e=1=minVideoSize.width?i:minVideoSize).width),null!==i.height&&(i.height=(i.height>=minVideoSize.height?i:minVideoSize).height),composeUrl(getUrl(\"cachedApi\"),\"videoThumb/\",this.video.blobHash,{position:ifDefined(this.posterImageGenerateAt,null),transform:\"crush\",resize:i.width+\"x\"+i.height,quality:\"90\",colorAccurate:\"true\"})):null},Video.prototype._createWarningMessage=function(){var e,t=function(e){var i=e.getContext(\"2d\"),t=[\"#ffffff\",\"#ffff00\",\"#00ffff\",\"#00ff00\",\"#ff00ff\",\"#ff0000\",\"#0000ff\"],a=t.slice().reverse(),n=(e.height=this.size.height,e.width=this.size.width,Math.ceil(.5*this.size.height)),s=Math.ceil(.5*this.size.height),r=Math.ceil(this.size.width/t.length);t.forEach(function(e,t){i.fillStyle=e,i.fillRect(r*t,0,r,n)}),a.forEach(function(e,t){i.fillStyle=e,i.fillRect(r*t,n,r,s)}),i.fillStyle=\"rgba(0,0,0,0.6)\",i.fillRect(0,0,this.size.width,this.size.height)}.bind(this);this._overlay||(this._overlay=document.createElement(\"div\"),this._overlay.style.display=\"none\",this._overlay.className=\"warning-wrapper\",(e=document.createElement(\"canvas\")).className=\"warning-canvas\",t(e),this._overlay.appendChild(e),(t=document.createElement(\"div\")).className=\"warning-message-container\",this._warningTriangle=document.createElement(\"div\"),this._warningTriangle.className=\"warning-triangle\",this._warningHourglass=document.createElement(\"div\"),this._warningHourglass.className=\"warning-hourglass\",this._warningMessage=document.createElement(\"div\"),this._warningMessage.className=\"warning-message\",t.appendChild(this._warningTriangle),t.appendChild(this._warningHourglass),t.appendChild(this._warningMessage),this._overlay.appendChild(t),this.node.appendChild(this._overlay))},Video.prototype.showWarningMessage=function(e){this._transcodingMsgShown||(this._transcodingMsgShown=!0,this._createWarningMessage(),removeClass(this._warningHourglass,\"show\"),removeClass(this._warningTriangle,\"show\"),\"TRANSCODING_IN_PROGRESS\"===e?(this._overlay.style.display=\"block\",this._warningMessage.innerText=Video.TRANSCODING_IN_PROGRESS,addClass(this._warningHourglass,\"show\")):\"TRANSCODING_ERROR\"===e?(this._overlay.style.display=\"block\",this._warningMessage.innerText=Video.TRANSCODING_ERROR,addClass(this._warningTriangle,\"show\")):\"AUTOPLAY_REJECTED\"===e&&(this._overlay.style.display=\"block\",this._warningMessage.innerText=Video.AUTOPLAY_REJECTED,addClass(this._warningTriangle,\"show\")))},Video.prototype._getNewStreamPresets=function(){return[\"x265_served_480p\",\"x265_served_1080p\",\"vp9_served_480p\",\"vp9_served_720p\"]},Video.prototype._isVideoTranscoding=function(){var e;this._isRendering&&!this.video.useRaw&&(e=composeUrl(creative.secure?creative.apiUrl:creative.insecureApiUrl,\"videoStream/status/\",this.video.blobHash),loadJSONP(e,function(e){var t=!1,i=!1,a=function(){this._player.pause(),this._player.hide()}.bind(this),n=e[this.transcodingGroup];isDefAndNotNull(n)&&(i=n.hasTranscodingError,t=this.canUseNewVideoStreams?this._getNewStreamPresets().every(function(e){return isDefAndNotNull(n[e+\"BlobHash\"])}):n.isFullyTranscoded),i?(a(),this.showWarningMessage(\"TRANSCODING_ERROR\")):t||(a(),this.showWarningMessage(\"TRANSCODING_IN_PROGRESS\"))}.bind(this)))},Video.prototype._appear=function(){creative.adapter.canMeasureViewportPlacementGeometry?(this._inViewAreaRatio=this.parentUnit.inView.areaInViewRatio,this.isConsideredInView=!0,this._skinPageContentElement=creative.adapter.skinGetters&&creative.adapter.skinGetters.getPageContentElement(),this._skinPageContentElement?(this._inViewAreaRatio=Math.min(this._inViewAreaRatio,this._getAreaNotCoveredByContentRatio()),this._clearSkinViewportChangeTimeout(),creative.adapter.on(\"viewportChange\",this._handleAreaCoveredOrAreaInViewRatioChangedThrottled),this.parentUnit.inView.on(\"areaInViewRatioChanged\",this._handleAreaCoveredOrAreaInViewRatioChanged)):this.parentUnit.inView.on(\"areaInViewRatioChanged\",this._handleAreaInViewRatioChanged),this._inViewAreaRatio>=this._viewabilityStartTriggerRatio&&(this._delayVideoAutoplay=!1)):creative.adapter.canMeasureContainerAreaInViewRatio?(this._inViewAreaRatio=creative.adapter.getContainerInViewAreaRatio(),this.isConsideredInView=!0,this._inViewAreaRatio>=this._viewabilityStartTriggerRatio&&(this._delayVideoAutoplay=!1),creative.adapter.on(\"containerAreaInViewRatioChanged\",this._handleAreaInViewRatioChanged)):creative.adapter.containerViewabilityObserver&&(this.isConsideredInView=creative.adapter.containerViewabilityObserver.isViewable,this.isConsideredInView&&(this._delayVideoAutoplay=!1),creative.adapter.on(\"containerViewableChange\",this._handleContainerViewableChange)),this.video&&(this.autoplay||this.isTeaser)&&!this._delayVideoAutoplay&&(this.playAction(new ActionContext(this,!1)),this.isTeaser&&this.on(\"enteredRenderTree\",function(){defer(this.playAction(new ActionContext(this,!1)))}.bind(this)))},Video.prototype._getAreaNotCoveredByContentRatio=function(){var e=0,t=CRect.adopt(this.getNode().getBoundingClientRect()),i=CRect.adopt(this._skinPageContentElement.getBoundingClientRect()),i=t.intersect(i),t=t.area;return e=0=e&&e<=this._viewabilityPauseTriggerRatio?(this.isConsideredInView=!1,this._leaveView()):this._inViewAreaRatio=this._viewabilityStartTriggerRatio&&(this.isConsideredInView=!0,this._playActionCalled?this._comeInView():this.video&&this.autoplay&&this.playAction(new ActionContext(this,!1)),this.playWhenInView=!1),this._inViewAreaRatio=e},Video.prototype._handleContainerViewableChange=function(e){this.isConsideredInView!==e&&((this.isConsideredInView=e)?this._comeInView():this._leaveView())},Video.prototype._videoEngineOptionsProvider=function(){return{hasAudio:this.video.meta.hasAudio,isTeaser:this.isTeaser,fallbackToMPEG1:this._fallbackToMPEG1,forceMPEG1Video:isTruthy(creative.runtimeParams.forceMPEG1Video),forceMPEG4Video:isTruthy(creative.runtimeParams.forceMPEG4Video),campaignExplorer:isTruthy(creative.runtimeParams.campaignExplorer),massProductionPreview:isTruthy(creative.runtimeParams.massProductionPreview),thumbnailMode:\"thumb\"===creative.runtimeParams.purpose,isSnapchatFormat:this._isSnapchatFormat,hqQuality:!!this.hqQuality,transcodingGroup:this.transcodingGroup,skipCodecs:this._getSkippedCodecs()}},Video.prototype._getSkippedCodecs=function(){var e=this.canUseNewVideoStreams?[]:[\"vp9\",\"h265\"];return e=creative.runtimeParams.skipCodecs?e.concat(String(decodeURIComponent(creative.runtimeParams.skipCodecs)).split(\",\").map(function(e){return e.toLowerCase()})):e},Video.prototype._getVideoOptions=function(){return{preload:this.preload||this.isTeaser||this.video.useRaw,pauseOnEnd:this.pauseOnEnd,playsInline:!0,componentName:this.name,canShowSpinner:!this.isTeaser,fullscreenMode:this._showFullscreenButton()?this.fullscreenMode:\"disabled\",repeatTimes:this.indefinitely||this.loop?2147483647:this.repeatTimes,closeFSOnEnd:this.closeOnEnd,fitting:this.fitting,barColor:\"fit\"===this.fitting&&this.barColor?this.barColor:\"#000000\",videoWidth:this.video.meta.width,videoHeight:this.video.meta.height,anchoringPoint:this.parentUnit.anchoringPoint,duration:parseFloat(this.video.meta.duration),hasAudio:this.video.meta.hasAudio,startMuted:this.muted,videoStream:{blobHash:this.video.blobHash,useRaw:this.video.useRaw,from:this.isTeaser?0:null,to:this.isTeaser?5:null,customUrlParameters:this._customUrlParameters},isDesktop:this._isDesktop}},Video.prototype.showEmptyVideoPlaceholder=function(){this.barColor&&(this.getNode().style.background=this.barColor),CeltraPlayerUtils.insertStyleTag(\"celtra-video-player-style\",VideoPlayerCss,this.getNode().ownerDocument),addClass(this.getNode(),\"video-player-wrapper-empty\")},Video.prototype._createPlayer=function(){if(!this._player)if(this.video){creative.adapter.checkVideoTranscodeStatus&&this._isVideoTranscoding();var i=this._videoEngineOptionsProvider(),a=(this._externalEngineProvided=!!i.videoElement,merge(this._getVideoOptions(),{videoElement:i.videoElement})),e=(this.posterDisabled?a.poster=null:this._hasPosterImage()&&(a.poster=this._getPosterUrl()),function(e,t){return VideoEngineProvider.createVideoEngineSpec(e,extend(i,{startMuted:t,preload:a.preload}))}.bind(this)),t=function(){return this.isUserEngaged&&creative.adapter.viewabilityMeasurable.viewable00&&this.isConsideredInView}.bind(this);if(this._player=new VideoPlayer(this.getNode(),e,this._getVideoControlsController(i),t,a),!this.isTeaser&&\"MasterVideo\"!==this.constructor.name)for(var n in this._player=QuartileEventsEmitter(this._player),this._player.QUARTILE_EVENTS)this._player.on(n,function(e){this.emit(e.name,e)}.bind(this));this._player.setDimensions(this._round(this.size.width),this._round(this.size.height)),this._attachListeners(),this._orientationLockHandler=CeltraPlayerUtils.orientationLockHandler.bind(null,this._player),this.parentUnit.addListener(\"orientationLockChanged\",this._orientationLockHandler)}else\"string\"!=typeof this.videoSourceFeedFieldKey&&this.showEmptyVideoPlaceholder()},Video.prototype._attachListeners=function(){var e;this._player&&(e=function(){this._cuePointObserver||(this._cuePointObserver=Object.create(CuePointObserver).init(this)),defer(this._cuePointObserver.start)}.bind(this),this._player.on(\"muted\",function(){this._videoContext&&this._videoContext.track({name:\"videoMuted\"}),this.fireTriggers(\"videoMute\"),this.emit(\"muted\")}.bind(this)),this._player.on(\"unmuted\",function(){this._videoContext&&this._videoContext.track({name:\"videoUnmuted\"}),this.fireTriggers(\"videoUnMute\"),this.emit(\"unmuted\")}.bind(this)),this._player.on(\"volumechange\",function(e){this.emit(\"volumechange\",e)}.bind(this)),this._player.on(\"play\",function(){e(),this.emit(\"play\")}.bind(this)),this._player.on(\"playing\",function(){e(),this.fireTriggers(\"videoPlaying\"),this.emit(\"playing\")}.bind(this)),this._player.on(\"enterfullscreen\",function(){this.fireTriggers(\"videoEnterFullScreen\"),this.emit(\"enterfullscreen\")}.bind(this)),this._player.on(\"custominfo\",function(e){new ActionContext(this,!1).track(e)}.bind(this)),this._player.on(\"exitfullscreen\",function(){this.fireTriggers(\"videoExitFullScreen\"),this.emit(\"exitfullscreen\")}.bind(this)),this._player.on(\"autoplayrejected\",function(){this.emit(\"autoplayrejected\")}.bind(this)),this._player.on(\"autoplaynotpossible\",function(){this.fallbackToImageSequence&&(this._fallbackToMPEG1=!0,this.resetAction(),this.playAction(new ActionContext(this,!1)))}.bind(this)),this._player.on(\"ended\",function(){this._cuePointObserver&&this._cuePointObserver.stop(!0),this.fireTriggers(\"videoComplete\"),this.emit(\"ended\")}.bind(this)),this._player.on(\"pause\",function(){this._cuePointObserver&&this._cuePointObserver.stop(),this._videoContext&&this._videoContext.track({name:\"videoPause\"}),this._player&&!this._player.silentPauseActive&&this.fireTriggers(\"videoPause\"),this._player&&this.emit(\"pause\",this._player.getCurrentTime())}.bind(this)),this._player.on(\"repeat\",function(){this._cuePointObserver&&this._cuePointObserver.stop(!0),this.fireTriggers(\"videoComplete\"),this.emit(\"repeat\")}.bind(this)),this._player.on(\"timeupdate\",function(){var e;this._player&&(e=this._player.getCurrentTime(),(this._previousTime||0)!==e&&this.emit(\"timeupdate\",e))}.bind(this)),this._player.on(\"durationchange\",function(){this._player&&this.emit(\"durationchange\",this._player.getDuration())}.bind(this)),this._player.on(\"userInteraction\",function(e){void 0!==e&&void 0!==e.isUserEngaged&&(this.isUserEngaged=e.isUserEngaged)}.bind(this)),this._player.on(\"loadstart\",function(){creative.adapter.manuallyAddResourceToResourceObserver&&this._player.activeSrc&&\"MasterVideo\"!==this.constructor.name&&creative.adapter.manuallyAddResourceToResourceObserver(this._player.activeSrc)}.bind(this)))},Video.prototype._getRealState=function(e,t,i){var a,t=e.videoEngineSpec.preload&&!deviceInfo.deviceType.desktop()?(a=!(!t&&i),i):(a=e.videoEngineSpec.startMuted,e.videoEngineSpec.inUserInitiatedThread);return{startMuted:a,inUserInitiatedThread:t}},Video.prototype._trackViewShown=function(e,t){e=this.appliedState?this.appliedState.inUserInitiatedThread:void 0,t=this.appliedState?this.appliedState.startMuted:void 0;if(!this.isTeaser){for(var i=this.parentScreen,a=this;a.parentContainer.parentObject;){if(\"undefined\"!=typeof DynamicContent&&a.parentContainer.parentObject instanceof DynamicContent){i=a.parentContainer;break}a=a.parentContainer.parentObject}var n=i.getActionsExecutedOnAppear().contains(\"play\",this.localId);new ActionContext(this,!1).track({name:\"viewShown\",viewName:this.name,clazz:this.constructor.name,filename:this.video&&this.video.name||null,label:this.name,source:this.video&&this.video.blobHash||null,sourceType:\"File\",userInitiated:void 0!==e?e:!n&&!this.autoplay,startMuted:void 0!==t?t:this.muted,videoPlayerMode:\"inline\",viewabilityStartTriggerRatio:this._viewabilityStartTriggerRatio,viewabilityPauseTriggerRatio:this._viewabilityPauseTriggerRatio,duration:this.getDuration()})}this._trackViewShown=noop},Video.prototype._emitVideoPlayAttempted=function(e,t,i,a){this._videoContext&&(this._videoContext.track(this._getVideoPlayAttemptedEvent(e,t,i,a)),this._player.activePreset?this._videoContext.track({name:\"videoPresetSelected\",videoPreset:this._player.activePreset}):this._player.once(\"loadstart\",function(){this._videoContext.track({name:\"videoPresetSelected\",videoPreset:this._player.activePreset})}.bind(this))),this._emitVideoPlayAttempted=noop},Video.prototype._getVideoPlayAttemptedEvent=function(e,t,i,a){return{name:\"videoPlayAttempted\",filename:this.video.name,trackable:!0,userInitiated:e,autoReplay:!!this.loop,startMuted:t,videoPlayerMode:\"inline\",engineType:i}},Video.prototype._exitedRenderTree=function(e){this.parentUnit.inView&&(this._skinPageContentElement?(this._clearSkinViewportChangeTimeout(),this.parentUnit.inView.off(\"areaInViewRatioChanged\",this._handleAreaCoveredOrAreaInViewRatioChanged),creative.adapter.off(\"viewportChange\",this._handleAreaCoveredOrAreaInViewRatioChangedThrottled)):this.parentUnit.inView.off(\"areaInViewRatioChanged\",this._handleAreaInViewRatioChanged)),creative.adapter.canMeasureContainerAreaInViewRatio&&creative.adapter.off(\"containerAreaInViewRatioChanged\",this._handleAreaInViewRatioChanged),creative.adapter.containerViewabilityObserver&&creative.adapter.off(\"containerViewableChange\",this._handleContainerViewableChange),this._destroyPlayer()},Video.prototype._destroyPlayer=function(){this._cuePointObserver&&(this._cuePointObserver.detach(),this._cuePointObserver=null),this._playActionCalled=!1,this._delayVideoAutoplay=!0,this._spec=null,this._player&&(this._player.destroy(),this._player=null,this.parentUnit.off(\"mediaStopRequested\",this._handleStopRequest),this.parentUnit.removeListener(\"orientationLockChanged\",this._orientationLockHandler),this._orientationLockHandler=null,this._videoContext=null,this._trackingEventsEmitter=null,this._trackingEventsRecorder=null),this._videoEventsAdapter&&(this._videoEventsAdapter&&this._videoEventsAdapter.destroy(),this._videoEventsAdapter=null)},Video.prototype._createVideoContext=function(e){this.isTeaser||!this._player||this._videoContext||(this._videoContext=new VideoContext(this,this.video,this.name),this._videoEventsAdapter=new VideoEventsAdapter(this._player),this._videoContext.registerSource(this._videoEventsAdapter),this._player.on(\"userInteraction\",this._videoContext.trackUserInteraction.bind(this._videoContext)))},Video.prototype._round=function(e){return Math.round(e)},Video.prototype._hasPosterImage=function(){return\"string\"==typeof this.posterImageFeedFieldKey||this.posterImageGenerate||isDefAndNotNull(this.posterImage)},Video.prototype.handleTap=function(e){e.stopPropagation()},Video.prototype.positionUsingTransforms=retFalse,Video.prototype.sizeUsingTransforms=retFalse,Video.prototype.getNaturalSize=function(){return this.originalSize},Video.prototype.getDuration=function(){var e=NaN;try{e=parseFloat(this.video.meta.duration)}catch(e){}return isNaN(e)?this._player?this._player.duration:0:e},Video.prototype.getCurrentTime=function(){return this._player?this._player.getCurrentTime():0},Video.prototype.setCurrentTime=function(e){return this._player?this._player.setCurrentTime(e):0},Video.prototype.playAction=function(e,t,i){var a;this._player&&(e||(console.warn(\"Context object has to be passed when calling playAction.\"),e=new ActionContext(this,{consideredUserInitiatedByBrowser:!1})),this._createPlayer(),this._createVideoContext(e.inUserInitiatedIteration),this.isUserEngaged=e.inUserInitiatedIteration,creative.adapter._stopAllMedia(\"toPlayVideo\"),a=t&&void 0!==t.startMuted?t.startMuted:this.muted,t&&\"touchstart\"===t.triggerId&&creative.adapter.muteSoundIfVideoStartedOnTouchStartEvent&&(a=!0),this._spec||(this._spec=this._player.createSpecs(e.inUserInitiatedIteration,a)),this._player.engineInitialized||this._player.initialize(this._spec),this.appliedState=this._getRealState(this._spec,a,e.inUserInitiatedIteration),this._player.play(this.appliedState.startMuted),this.appliedState.inUserInitiatedThread&&this._videoContext.trackUserInteraction(),this._emitVideoPlayAttempted(e.consideredUserInitiatedByBrowser,this.appliedState.startMuted,this._spec.videoEngineSpec.engineType,this._spec.videoEngineSpec.preset),this._playActionCalled=!0,this.parentUnit.off(\"mediaStopRequested\",this._handleStopRequest),this.parentUnit.on(\"mediaStopRequested\",this._handleStopRequest)),(i||noop)()},Video.prototype._handleStopRequest=function(e){\"toPlayVideo\"===e?(this._player.pause(),this.playWhenInView=!1):this._leaveView()},Video.prototype.pauseAction=function(e,t,i){this._player&&this._player.isState(CeltraPlayerUtils.PLAYING)&&this._player.pause(),(i||noop)()},Video.prototype.rewindAction=function(e,t,i){this._player&&this._player.replay(),(i||noop)()},Video.prototype.resetAction=function(e,t,i){this._destroyPlayer(),Video.uber.resetAction.call(this,e,t,function(){this._isRendering&&this._createPlayer(),this._emitVideoPlayAttempted=Video.prototype._emitVideoPlayAttempted.bind(this),i&&i()}.bind(this))},Video.prototype.muteAction=function(e,t,i){this._player&&this._player.mute(),this.muted=!0,(i||noop)()},Video.prototype.unMuteAction=function(e,t,i){this._player&&this._player.unMute(),this.muted=!1,(i||noop)()},Video.prototype.enterFullScreenAction=function(e,t,i){this._player&&this._player.enterFullScreen(),(i||noop)()},Video.prototype.exitFullScreenAction=function(e,t,i){this._player&&this._player.exitFullScreen(),(i||noop)()},Video.prototype.setCustomUrlParameter=function(e,t){this._customUrlParameters[e]=t};;\nfunction Picture(){}inherit(Picture,ScreenObject),extend(Picture.prototype,FeedImageCreator),extend(Picture.prototype,StaticContentMixin),Picture.toString=function(){return\"[Clazz Picture]\"},Picture.prototype.toString=function(){return\"[Picture \"+this.localId+\"]\"},Picture.prototype.createNode=function(){\"string\"==typeof this.imageSourceFeedFieldKey&&(FeedData.checkAndTrackValue(this.imageSourceFeedFieldKey,this.imageSourceFeedRowIndex,this.constructor.name,\"imageSourceFeedFieldKey\"),this.file=this._createFeedImageFile(\"imageSource\",this.imageSourceFeedRowIndex));var t=Picture.uber.createNode.call(this);return this.file===this.placeholderFile?\"string\"==typeof this.imageSourceFeedFieldKey||this._newFileWasSet||(addClass(t,\"empty\"),this._preloadImage(new File(\"runner/image-placeholder.png\"),function(e,i){this._isSettingFileInProgress||(t.style.backgroundImage=\"url(\"+i+\")\")}.bind(this))):this.file&&this._preloadImage(this.file,{},function(e,i){this._newFileWasSet||this._handlePreloadedImage(t,e)}.bind(this)),t},Picture.prototype.awake=function(){Picture.uber.awake.call(this),this.placeholderFile=new File(\"runner/image-placeholder.png\"),this.placeholderFile.meta={height:28,width:28},this.file||(this.file=this.placeholderFile),this._originalFile=this.file,this._newFileWasSet=!1},Picture.prototype._handlePreloadedImage=function(e,i){this.file.dynamic&&(this.file.meta={height:i.naturalHeight,width:i.naturalWidth});var t=\"\",r=\"\",s=\"no-repeat\",a=(this.imagePosition&&(t=this.imagePosition.replace(\"-\",\" \")),this.sizeUsingTransforms()?this.getNaturalSize():this.size),n=this.fittingSize;switch(n=\"fitUpToOriginal\"===this.fittingSize?a.width=this._scene.onEndRepeatCount||\"reverse\"===this._scene.onEnd&&this._scene.onEndReverseCount&&this._state.loopCount>=2*this._scene.onEndReverseCount||0===this._scene.getDuration().milliseconds}}),Object.defineProperty(TimeScenePlayer.prototype,\"_newLoopStarted\",{get:function(){return this._state.isDirty(\"loopCount\")}}),TimeScenePlayer.prototype._update=function(e){var t=this._scene.getDuration().milliseconds,t=(this._startTime=this._startTime||e,this._lastUpdateTime&&(this._startTime-=this._lastUpdateTime,this._lastUpdateTime=null),this._elapsedTime=e-this._startTime,this._state.loopCount=Math.floor(0